diff --git a/core/cleanup.py b/core/cleanup.py index 800b582..4238fd7 100644 --- a/core/cleanup.py +++ b/core/cleanup.py @@ -44,7 +44,7 @@ class CleanupTimer: for i in list(DATA_STORE.spots.keys()): try: spot = DATA_STORE.spots.get(i) - if spot.expired(): + if spot and spot.expired(): DATA_STORE.spots.delete(i) except KeyError: # Must have already been deleted, OK with that @@ -52,7 +52,7 @@ class CleanupTimer: for i in list(DATA_STORE.alerts.keys()): try: alert = DATA_STORE.alerts.get(i) - if alert.expired(): + if alert and alert.expired(): DATA_STORE.alerts.delete(i) except KeyError: # Must have already been deleted, OK with that diff --git a/templates/add_spot.html b/templates/add_spot.html index 2b5ef36..8f13ea9 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 31b429c..f8d6d79 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -82,7 +82,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index c2cbb90..066ad03 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -79,8 +79,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index 45320bf..a60793c 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 %}