From 760c2a864c35f1d2c2efae9f146538b1697685c4 Mon Sep 17 00:00:00 2001 From: Felipe Carlos Date: Thu, 22 Feb 2024 07:15:47 -0300 Subject: [PATCH] contrib: updating geonames transform operation --- .../contrib/geonames/datastreams.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/invenio_geographic_identifiers/contrib/geonames/datastreams.py b/invenio_geographic_identifiers/contrib/geonames/datastreams.py index b42a6a0..73f5c0b 100644 --- a/invenio_geographic_identifiers/contrib/geonames/datastreams.py +++ b/invenio_geographic_identifiers/contrib/geonames/datastreams.py @@ -51,22 +51,7 @@ def apply(self, stream_entry, *args, **kwargs): } } ], - "extras": list( - chain( - *[ - list( - filter( - lambda x: x is not None and x.strip(), - map( - lambda y: stream_entry.entry.get(y), - ["asciiname", "name", "alternativenames"], - ), - ) - ), - record_country, - ] - ) - ), + "extras": [stream_entry.entry.get("asciiname"), *record_country], } return stream_entry