mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-01 10:24:46 +00:00
Ensure that latitude and longitude are floats
This commit is contained in:
1 parent
ba709c24e8
commit
a95dbe0fe4
1 file changed
+4
@@ -329,6 +329,8 @@ def get_location_from_post(post_json_object: {}) -> str:
|
||||
longitude = float(longitude)
|
||||
if is_west and longitude > 0:
|
||||
longitude = -longitude
|
||||
if not isinstance(longitude, float):
|
||||
longitude = None
|
||||
if property_dict['name'] == "GPSLatitude":
|
||||
latitude = property_dict['value']
|
||||
is_south = False
|
||||
@@ -343,6 +345,8 @@ def get_location_from_post(post_json_object: {}) -> str:
|
||||
latitude = float(latitude)
|
||||
if is_south and latitude > 0:
|
||||
latitude = -latitude
|
||||
if not isinstance(latitude, float):
|
||||
latitude = None
|
||||
if latitude is not None and \
|
||||
longitude is not None:
|
||||
locn2 = {
|
||||
|
||||
Reference in new issue
Block a user