From 6da32416be0c10e3959ec6ed759b08945c55e9fb Mon Sep 17 00:00:00 2001 From: Ian Ward Date: Mon, 25 Nov 2013 09:37:37 -0500 Subject: [PATCH] [#1255] package_show: add use_default_schema parameter --- ckan/logic/action/get.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ckan/logic/action/get.py b/ckan/logic/action/get.py index d4bdecc2a2a..0557b22d397 100644 --- a/ckan/logic/action/get.py +++ b/ckan/logic/action/get.py @@ -761,6 +761,9 @@ def package_show(context, data_dict): :param id: the id or name of the dataset :type id: string + :param use_default_schema: use default package schema instead of + a custom schema defined with an IDatasetForm plugin (default: False) + :type use_default_schema: bool :rtype: dictionary @@ -778,6 +781,9 @@ def package_show(context, data_dict): _check_access('package_show', context, data_dict) + if data_dict.get('use_default_schema', False): + context['schema'] = ckan.logic.schema.default_show_package_schema() + package_dict = None use_cache = (context.get('use_cache', True) and not 'revision_id' in context