diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py index bd7c1688ead2feaf94a1f71f9b4ca484f5b45f08..a2b0d4a5bd9737a75604619213bfaefa6693a6a2 100644 --- a/ckanext/odsh/plugin.py +++ b/ckanext/odsh/plugin.py @@ -220,9 +220,11 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm if resource.get('package_id'): tools.add_attributes_resources(context, resource) - def after_update(self, context, resource): - if resource.get('package_id'): - tools.add_attributes_resources(context, resource) + def after_update(self, context, resource_or_package): + if resource_or_package.get('package_id'): # this is a resource + tools.add_attributes_resources(context, resource_or_package) + else: # this is a package + pass @staticmethod def _update_is_new_in_pkg_dict(pkg_dict):