diff --git a/ckan/logic/action/create.py b/ckan/logic/action/create.py index b320cd5e013..9028e2fc9d1 100644 --- a/ckan/logic/action/create.py +++ b/ckan/logic/action/create.py @@ -152,6 +152,10 @@ def package_create(context, data_dict): # Needed to let extensions know the package id model.Session.flush() + _get_action('package_owner_org_update')(context, + {'id': pkg.id, + 'organization_id': pkg.owner_org}) + for item in plugins.PluginImplementations(plugins.IPackageController): item.create(pkg) diff --git a/ckan/logic/action/update.py b/ckan/logic/action/update.py index a3d1d1db29a..b249b60ee31 100644 --- a/ckan/logic/action/update.py +++ b/ckan/logic/action/update.py @@ -269,6 +269,10 @@ def package_update(context, data_dict): pkg = model_save.package_dict_save(data, context) + _get_action('package_owner_org_update')(context, + {'id': pkg.id, + 'organization_id': pkg.owner_org}) + for item in plugins.PluginImplementations(plugins.IPackageController): item.edit(pkg) if not context.get('defer_commit'):