Skip to content

Commit

Permalink
[#2421] pop package schema from context before creating views
Browse files Browse the repository at this point in the history
  • Loading branch information
pduchesne authored and amercader committed May 11, 2015
1 parent 241c68e commit d73bee5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/logic/action/create.py
Expand Up @@ -206,6 +206,9 @@ def package_create(context, data_dict):

item.after_create(context, data)

# Make sure that a user provided schema is not used in create_views and on package_show
context.pop('schema', None)

# Create default views for resources if necessary
if data.get('resources'):
logic.get_action('package_create_default_resource_views')(
Expand All @@ -220,9 +223,6 @@ def package_create(context, data_dict):
context["id"] = pkg.id
log.debug('Created object %s' % 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 \
Expand Down

0 comments on commit d73bee5

Please sign in to comment.