Skip to content

Commit

Permalink
Merge pull request #8130 from ckan/fix_use_default_schema_parameter
Browse files Browse the repository at this point in the history
Evaluate use_default_schema as boolean
  • Loading branch information
wardi committed Mar 26, 2024
2 parents fae6879 + 3522bba commit 7926c62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/8130.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``use_default_schema`` in ``package_show`` is now evaluated as boolean.
2 changes: 1 addition & 1 deletion ckan/logic/action/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ def package_show(context: Context, data_dict: DataDict) -> ActionResult.PackageS
context['package'] = pkg
_check_access('package_show', context, data_dict)

if data_dict.get('use_default_schema', False):
if asbool(data_dict.get('use_default_schema', False)):
context['schema'] = ckan.logic.schema.default_show_package_schema()

package_dict = None
Expand Down

0 comments on commit 7926c62

Please sign in to comment.