Skip to content

Commit

Permalink
[#1078] force package_show return type within resource_create
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Sep 4, 2013
1 parent 9330b47 commit 12420ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/logic/action/create.py
Expand Up @@ -245,7 +245,8 @@ def resource_create(context, data_dict):
package_id = _get_or_bust(data_dict, 'package_id')
data_dict.pop('package_id')

pkg_dict = _get_action('package_show')(context, {'id': package_id})
pkg_dict = _get_action('package_show')(dict(context, return_type='dict'),
{'id': package_id})

_check_access('resource_create', context, data_dict)

Expand Down

0 comments on commit 12420ce

Please sign in to comment.