Skip to content

Commit

Permalink
Merge branch 'pduchesne-2421-remove-schema-before-create-view'
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed May 11, 2015
2 parents 4fe6d10 + 9fe5450 commit 7b8fd5f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ckan/logic/action/create.py
Expand Up @@ -206,6 +206,10 @@ 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 +224,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 7b8fd5f

Please sign in to comment.