From 0fcc459cc4bac964f92d0b54f53b327cfa51c972 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Sat, 5 Sep 2026 10:24:18 +0100 Subject: [PATCH] Fix some dodgy handling of DME references --- core/sig_lookup_helper.py | 2 +- templates/add_spot.html | 2 +- templates/alerts.html | 2 +- templates/bands.html | 4 ++-- templates/base.html | 10 +++++----- templates/conditions.html | 2 +- templates/map.html | 4 ++-- templates/spots.html | 4 ++-- templates/status.html | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/sig_lookup_helper.py b/core/sig_lookup_helper.py index d3649e3..6d818bf 100644 --- a/core/sig_lookup_helper.py +++ b/core/sig_lookup_helper.py @@ -44,7 +44,7 @@ def get_sig_ref_info(sig_name, ref_id): if sig_name.upper() == "DME": match = re.match(r"DME[\- ](\d{3,5})", ref_id, re.IGNORECASE) number = match.group(1) - return f"DME-{number.zfill(5)}" + ref_id = f"DME-{number.zfill(5)}" # DTMBA spotters sometimes include spaces and dashes, our regex allows them but they must be removed here so we # can look up against the official list which doesn't have them diff --git a/templates/add_spot.html b/templates/add_spot.html index dd3bcde..1ce7717 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -77,7 +77,7 @@ - + diff --git a/templates/alerts.html b/templates/alerts.html index ad910bd..1def641 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -83,7 +83,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index ef74cdd..567a03a 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -76,8 +76,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index c9ab30e..cd3db52 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -16,10 +16,10 @@ window.fetchEventSource = fetchEventSource; - - - - + + + + {% end %} {% block body %}
diff --git a/templates/conditions.html b/templates/conditions.html index 265d3ba..3339b71 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,7 +284,7 @@
- + diff --git a/templates/map.html b/templates/map.html index e6ead7c..1dc7e41 100644 --- a/templates/map.html +++ b/templates/map.html @@ -113,8 +113,8 @@ const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}"; - - + + diff --git a/templates/spots.html b/templates/spots.html index 7774944..5fc9d19 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -113,8 +113,8 @@ - - + + diff --git a/templates/status.html b/templates/status.html index 3c950bb..54557dd 100644 --- a/templates/status.html +++ b/templates/status.html @@ -86,7 +86,7 @@ - +