diff --git a/ckan/logic/action/create.py b/ckan/logic/action/create.py index dfb79962859..f7d0913587f 100644 --- a/ckan/logic/action/create.py +++ b/ckan/logic/action/create.py @@ -176,6 +176,9 @@ def package_create(context, data_dict): context["id"] = pkg.id log.debug('Created object %s' % str(pkg.name)) + # Make sure that a user provided schema is not used on package_show + context.pop('schema', None) + return_id_only = context.get('return_id_only', False) output = context['id'] if return_id_only \ diff --git a/ckan/logic/action/update.py b/ckan/logic/action/update.py index 9f9e18dc834..d53a503ad41 100644 --- a/ckan/logic/action/update.py +++ b/ckan/logic/action/update.py @@ -291,6 +291,9 @@ def package_update(context, data_dict): return_id_only = context.get('return_id_only', False) + # Make sure that a user provided schema is not used on package_show + context.pop('schema', None) + # we could update the dataset so we should still be able to read it. context['ignore_auth'] = True output = data_dict['id'] if return_id_only \