From ae1f752516326bb96f05e3a2df2f48eee9115707 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Sat, 15 Aug 2026 13:59:52 +0100 Subject: [PATCH] Fix bugs in GMA and WWBOTA providers --- providers/spot/gma.py | 14 +++++++------- providers/spot/wwbota.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 +- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/providers/spot/gma.py b/providers/spot/gma.py index 13b341b..509d48a 100644 --- a/providers/spot/gma.py +++ b/providers/spot/gma.py @@ -135,23 +135,23 @@ class GMA(HTTPSpotProvider): spot.sig_refs[0].sig = ref_info["reftype"] spot.sig = ref_info["reftype"] - # Add to our list. Don't worry about de-duping, removing old spots etc. at this point; - # other code will do that for us. - new_spots.append(spot) - elif not ref_response.from_cache: if not ref_response.ok: logger.warning( f"HTTP {ref_response.status_code} when looking up GMA ref {source_spot['REF']}" ) else: - logger.warning( - f"GMA API returned a malformed response when looking up ref {source_spot['REF']}" + logger.debug( + f"GMA API had no data for {source_spot['REF']}, it may not be a valid reference." ) except Exception: logger.exception( - f"Exception when looking up {self.REF_INFO_URL_ROOT}{source_spot['REF']}, ignoring this spot for now" + f"Exception when looking up {self.REF_INFO_URL_ROOT}{source_spot['REF']}, SIG data will not be populated for the spot." ) + + # Add to our list. Don't worry about de-duping, removing old spots etc. at this point; + # other code will do that for us. + new_spots.append(spot) else: logger.warning(f"The GMA API returned an unexpected response (HTTP {http_response.status_code}).") diff --git a/providers/spot/wwbota.py b/providers/spot/wwbota.py index df6f174..253151a 100644 --- a/providers/spot/wwbota.py +++ b/providers/spot/wwbota.py @@ -34,7 +34,7 @@ class WWBOTA(SSESpotProvider): dx_call=source_spot["call"].upper(), de_call=source_spot["spotter"].upper(), freq=float(source_spot["freq"]) * 1000000, - mode=source_spot["mode"].upper(), + mode=source_spot["mode"].upper() if "mode" in source_spot else None, comment=source_spot["comment"], sig="WWBOTA", sig_refs=refs, diff --git a/templates/add_spot.html b/templates/add_spot.html index b30f288..d53da00 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -76,7 +76,7 @@ - + diff --git a/templates/alerts.html b/templates/alerts.html index a15ebea..38c525e 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -84,7 +84,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index 92dcdb9..b8111e0 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -76,8 +76,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index 9d02f97..1e7ff9e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -15,10 +15,10 @@ window.fetchEventSource = fetchEventSource; - - - - + + + + {% end %} {% block body %}
diff --git a/templates/conditions.html b/templates/conditions.html index 72f916d..03b3fca 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,7 +284,7 @@
- + diff --git a/templates/map.html b/templates/map.html index 55822cd..c2ae699 100644 --- a/templates/map.html +++ b/templates/map.html @@ -109,8 +109,8 @@ - - + + diff --git a/templates/spots.html b/templates/spots.html index b77fbcb..437553a 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -113,8 +113,8 @@ - - + + diff --git a/templates/status.html b/templates/status.html index f2ce437..81a692a 100644 --- a/templates/status.html +++ b/templates/status.html @@ -86,7 +86,7 @@ - +