From cbb0af5809d7feefaa3b56f03f1c39707de25dd9 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Sun, 26 Nov 2023 20:14:42 -0500 Subject: [PATCH] safeguard wmo:topic deletion --- wis2_gdc/registrar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wis2_gdc/registrar.py b/wis2_gdc/registrar.py index db7d9bb..5249189 100644 --- a/wis2_gdc/registrar.py +++ b/wis2_gdc/registrar.py @@ -156,7 +156,7 @@ def is_wis2_mqtt_link(link) -> bool: channel = value.get('wmo:topic', value.get('channel')) new_link = value - del new_link['wmo:topic'] + _ = new_link.pop('wmo:topic', None) new_link['rel'] = 'items' new_link['channel'] = channel.replace('origin', 'cache')