From 211755ef00bb76950b8b9b458920b18a003507d3 Mon Sep 17 00:00:00 2001 From: Maaike Date: Tue, 19 Nov 2024 14:51:25 +0100 Subject: [PATCH] don't add topics to links, don't remove topics --- wis2box-management/wis2box/metadata/station.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wis2box-management/wis2box/metadata/station.py b/wis2box-management/wis2box/metadata/station.py index f3b0a08ed..e430f4f2e 100644 --- a/wis2box-management/wis2box/metadata/station.py +++ b/wis2box-management/wis2box/metadata/station.py @@ -335,8 +335,6 @@ def publish_from_csv(path: Path, new_topic: str = None) -> None: if wigos_station_identifier in stations: feature = stations[wigos_station_identifier] topics = feature['properties'].get('topics', []) - # remove topics not in valid_topics - topics = [x for x in topics if x in valid_topics] # add new_topic if not already in topics if new_topic is not None: topic2 = new_topic @@ -378,8 +376,7 @@ def publish_from_csv(path: Path, new_topic: str = None) -> None: 'topics': topics, # TODO: update with real-time status as per https://codes.wmo.int/wmdr/_ReportingStatus # noqa 'status': 'operational' - }, - 'links': topics + } } LOGGER.debug('Checking properties against WMDR code lists')