Fix order of latitude / longitude

This commit is contained in:
Ceda EI 2018-12-14 01:46:33 +05:30
parent 937c306c67
commit fb8cf56ef6
1 changed files with 2 additions and 2 deletions

View File

@ -24,9 +24,9 @@ def get_coordinates(location, geocoder, cache_db):
loc = geocoder.forward(location)
coordinates = loc.geojson()['features'][0]['center']
cache_db.execute("insert into location(name, lat, lon) values(?,?,?)",
cache_db.execute("insert into location(name, lon, lat) values(?,?,?)",
(location, *coordinates))
return tuple(coordinates)
return (coordinates[1], coordinates[0])
def get_weather(coordinates):