diff --git a/ckanext/datavic_harvester/harvesters/delwp.py b/ckanext/datavic_harvester/harvesters/delwp.py index 86e7413..500d586 100644 --- a/ckanext/datavic_harvester/harvesters/delwp.py +++ b/ckanext/datavic_harvester/harvesters/delwp.py @@ -342,6 +342,7 @@ def _get_pkg_dict(self, harvest_object): metashare_dict["_uuid"] = uuid remote_pkg_name: Optional[str] = metashare_dict.get("name") + remote_topiccat: Optional[str] = metashare_dict.get("topiccat") full_metadata_url = ( self.config["full_metadata_url_prefix"].format(**{"UUID": uuid}) @@ -360,12 +361,12 @@ def _get_pkg_dict(self, harvest_object): pkg_dict["title"] = metashare_dict.get("title") pkg_dict["notes"] = metashare_dict.get("abstract", "") - pkg_dict["tags"] = helpers.get_tags(metashare_dict.get("topiccat")) + pkg_dict["tags"] = helpers.get_tags(remote_topiccat) if remote_topiccat else [] pkg_dict["last_updated"] = metashare_dict.get("geonet_info_changedate") pkg_dict["extract"] = f"{pkg_dict['notes'].split('.')[0]}..." pkg_dict["owner_org"] = self._get_organisation( self.config.get("organisation_mapping"), - metashare_dict.get("resowner").split(";")[0], + metashare_dict.get("resowner", "").split(";")[0], harvest_object, )