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 committed Mar 13, 2017
1 parent 07ce1ec commit 4fb48e5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ckan/controllers/package.py
Expand Up @@ -579,12 +579,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 4fb48e5

Please sign in to comment.