fixed check for nonzero lat/long

This commit is contained in:
Josh Bauer 2019-11-14 21:15:12 -05:00
parent 5f593a4231
commit 59ae35372e
No known key found for this signature in database
GPG Key ID: 09D7ED7B5BF004B4

View File

@ -338,7 +338,7 @@ class PositionFile:
lat = self._json['Latitude']
if self.type() == PositionFile.GEO:
lat = self._json['location']['lat']
if lat > 0:
if lat != 0:
return lat
raise ValueError("Lat is 0")
except KeyError:
@ -351,7 +351,7 @@ class PositionFile:
lng = self._json['Longitude']
if self.type() == PositionFile.GEO:
lng = self._json['location']['lng']
if lng > 0:
if lng != 0:
return lng
raise ValueError("Lng is 0")
except KeyError: