Skip to content

Commit

Permalink
Merge pull request #103 from keitaroinc/master
Browse files Browse the repository at this point in the history
Remove extras from data_dict on action package_patch
  • Loading branch information
klikstermkd authored Oct 28, 2016
2 parents 100e955 + 85412e0 commit a406676
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ckanext/iati/logic/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import ckan.logic.action.get as get_core
import ckan.logic.action.create as create_core
import ckan.logic.action.update as update_core
import ckan.logic.action.patch as patch_core

import ckanext.iati.emailer as emailer

Expand All @@ -38,6 +39,14 @@ def package_update(context, data_dict):

return update_core.package_update(context, data_dict)

def package_patch(context, data_dict):

# The only thing we do here is remove some extras that are always
# inherited from the dataset publisher, to avoid duplicating them
_remove_extras_from_data_dict(data_dict)

return patch_core.package_patch(context, data_dict)

def organization_create(context, data_dict):

# When creating a publisher, if the user is not a sysadmin it will be
Expand Down
1 change: 1 addition & 0 deletions ckanext/iati/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ def get_actions(self):
function_names = (
'package_create',
'package_update',
'package_patch',
'organization_create',
'organization_update',
'issues_report_csv',
Expand Down

0 comments on commit a406676

Please sign in to comment.