Skip to content

Commit

Permalink
fix edit resource of draft dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
fanjinfei authored and smotornyuk committed Mar 24, 2017
1 parent e2f809e commit c1dd3ac
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ckan/controllers/package.py
Expand Up @@ -586,12 +586,7 @@ def resource_edit(self, id, resource_id, data=None, errors=None,
# dataset has not yet been fully created
resource_dict = get_action('resource_show')(context,
{'id': resource_id})
fields = ['url', 'resource_type', 'format', 'name', 'description',
'id']
data = {}
for field in fields:
data[field] = resource_dict[field]
return self.new_resource(id, data=data)
return self.new_resource(id, data=resource_dict)
# resource is fully created
try:
resource_dict = get_action('resource_show')(context,
Expand Down

0 comments on commit c1dd3ac

Please sign in to comment.