Turns out "if x in list" returns true if list[x] = None, so guard against that by checking list.get(x) instead

This commit is contained in:
Ian Renton
2026-09-18 21:33:26 +01:00
parent 4b51dd9ba5
commit f0df4f38ca
13 changed files with 32 additions and 32 deletions
+2 -2
View File
@@ -69,8 +69,8 @@ class APRSIS(SpotProvider):
de_call=de_call,
de_ssid=de_ssid,
comment=str(data["comment"]) if "comment" in data else None,
dx_latitude=float(data["latitude"]) if "latitude" in data else None,
dx_longitude=float(data["longitude"]) if "longitude" in data else None,
dx_latitude=float(data["latitude"]) if data.get("latitude") is not None else None,
dx_longitude=float(data["longitude"]) if data.get("longitude") is not None else None,
time=datetime.now(pytz.UTC).timestamp(),
) # APRS-IS spots are live so we can assume spot time is "now"