Skip invalid location on sidebar map

This commit is contained in:
shortcutme 2017-01-21 22:58:44 +01:00
parent 778e010bb3
commit e92c861e1c
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -560,7 +560,7 @@ class UiWebsocketPlugin(object):
globe_data += (lat, lon, ping)
# Append myself
loc = geodb.get(config.ip_external)
if loc:
if loc and loc.get("location"):
lat, lon = (loc["location"]["latitude"], loc["location"]["longitude"])
globe_data += (lat, lon, -0.135)