Skip to content

Commit

Permalink
[#1255] package_show: add use_default_schema parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Nov 25, 2013
1 parent 9c4387e commit 6da3241
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckan/logic/action/get.py
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6da3241

Please sign in to comment.