Minor fix and move URLs to .app

This commit is contained in:
Ian Renton
2025-10-07 16:20:03 +01:00
parent 2dcfae98f8
commit abff65f78d
5 changed files with 12 additions and 12 deletions

View File

@@ -132,7 +132,7 @@ class WebServer:
spots = []
for k in spot_ids:
spots.append(self.spots.get(k))
spots = sorted(spots, key=lambda spot: spot.time, reverse=True)
spots = sorted(spots, key=lambda spot: (spot.time if spot and spot.time else 0), reverse=True)
for k in query.keys():
match k:
case "since":
@@ -187,7 +187,7 @@ class WebServer:
alerts = []
for k in alert_ids:
alerts.append(self.alerts.get(k))
alerts = sorted(alerts, key=lambda alert: alert.start_time)
alerts = sorted(alerts, key=lambda alert: (alert.start_time if alert and alert.start_time else 0))
for k in query.keys():
match k:
case "received_since":