Skip to content

Commit 0738364

Browse files
committed
fix: geolocation results are now always a list
1 parent a3a0d4c commit 0738364

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stac_search/agents/items_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ async def get_polygon_from_geodini(location: str):
294294
geodini_api = f"{GEODINI_API}/search"
295295
async with aiohttp.ClientSession() as session:
296296
async with session.get(geodini_api, params={"query": location}) as response:
297-
result = (await response.json()).get("result", None)
297+
result = (await response.json()).get("results", [])
298298
if result:
299-
return result.get("geometry", None)
299+
return result[0].get("geometry", None)
300300
return None
301301

302302

0 commit comments

Comments
 (0)