move get_addressdata() implementation to Python

The pgsql function get_addressdata() does a lookup of a lot of data
that is already available in Python.
This commit is contained in:
Sarah Hoffmann
2023-09-23 10:44:37 +02:00
parent 87c91ec5c4
commit 7fcbe13669
10 changed files with 261 additions and 116 deletions

View File

@@ -183,9 +183,6 @@ async def get_detailed_place(conn: SearchConnection, place: ntyp.PlaceRef,
# add missing details
assert result is not None
result.parent_place_id = row.parent_place_id
result.linked_place_id = getattr(row, 'linked_place_id', None)
result.admin_level = getattr(row, 'admin_level', 15)
indexed_date = getattr(row, 'indexed_date', None)
if indexed_date is not None:
result.indexed_date = indexed_date.replace(tzinfo=dt.timezone.utc)