mirror of
https://gitlab.com/ceda_ei/sky
synced 2025-04-16 10:46:51 +02:00
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…
x
Reference in New Issue
Block a user