More data for mobile layout and extra defensive coding

This commit is contained in:
Ian Renton
2025-10-13 18:27:32 +01:00
parent 329fa7755d
commit 8582dfdc75
2 changed files with 5 additions and 3 deletions

View File

@@ -139,7 +139,9 @@ class WebServer:
spot_ids = list(self.spots.iterkeys())
spots = []
for k in spot_ids:
spots.append(self.spots.get(k))
s = self.spots.get(k)
if s is not None:
spots.append(s)
spots = sorted(spots, key=lambda spot: (spot.time if spot and spot.time else 0), reverse=True)
for k in query.keys():
match k: