mirror of https://gitlab.com/ceda_ei/sky
Fix order of latitude / longitude
This commit is contained in:
parent
937c306c67
commit
fb8cf56ef6
|
@ -24,9 +24,9 @@ def get_coordinates(location, geocoder, cache_db):
|
||||||
|
|
||||||
loc = geocoder.forward(location)
|
loc = geocoder.forward(location)
|
||||||
coordinates = loc.geojson()['features'][0]['center']
|
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))
|
(location, *coordinates))
|
||||||
return tuple(coordinates)
|
return (coordinates[1], coordinates[0])
|
||||||
|
|
||||||
|
|
||||||
def get_weather(coordinates):
|
def get_weather(coordinates):
|
||||||
|
|
Loading…
Reference in New Issue