Skip to content

Commit

Permalink
package update and create now use show for returning data
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Feb 27, 2012
1 parent 72f2070 commit d3fb23b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ckan/logic/action/create.py
Expand Up @@ -84,7 +84,7 @@ def package_create(context, data_dict):
## this is added so that the rest controller can make a new location
context["id"] = pkg.id
log.debug('Created object %s' % str(pkg.name))
return model_dictize.package_dictize(pkg, context)
return logic.get_action('package_show')(context, {'id':context['id']})

def package_create_validate(context, data_dict):
model = context['model']
Expand Down
2 changes: 1 addition & 1 deletion ckan/logic/action/update.py
Expand Up @@ -187,7 +187,7 @@ def package_update(context, data_dict):
item.edit(pkg)
if not context.get('defer_commit'):
model.repo.commit()
return model_dictize.package_dictize(pkg, context)
return get_action('package_show')(context, data_dict)

def package_update_validate(context, data_dict):
model = context['model']
Expand Down

0 comments on commit d3fb23b

Please sign in to comment.