From e2267ba27f6806f56342fb3222b95cac79bfd6b6 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Fri, 25 Sep 2026 07:10:50 +0100 Subject: [PATCH] Fix check that alerts have attributes for compatibility with v2 alerts still in system --- data/spot.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/data/spot.py b/data/spot.py index 4c1d3a1..c53da15 100644 --- a/data/spot.py +++ b/data/spot.py @@ -422,7 +422,7 @@ class Spot: now = datetime.now(pytz.UTC).timestamp() for alert in DATA_STORE.alerts.values(): if ( - alert.activities + hasattr(alert, "activities") # Reject any v2 alerts still in database and ActivityName.DXPEDITION in alert.activities and alert.dx_calls and alert.start_time diff --git a/templates/add-spot.html b/templates/add-spot.html index ba66730..164ea98 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 f863e26..6a3c3b5 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -85,7 +85,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index ac26718..73e32bb 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -76,8 +76,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index 87ddedf..981ab99 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 9d48583..03ded5e 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,7 +284,7 @@
- + diff --git a/templates/map.html b/templates/map.html index ba4569e..95923a4 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 9358216..1743994 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -125,8 +125,8 @@ - - + + diff --git a/templates/status.html b/templates/status.html index 04d9d09..c459f82 100644 --- a/templates/status.html +++ b/templates/status.html @@ -96,7 +96,7 @@ - +