mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
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:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user