From: Sarah Hoffmann Date: Tue, 31 Oct 2023 20:10:23 +0000 (+0100) Subject: fix assertion on address list, it may be empty X-Git-Tag: v4.4.0~84 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/2bf8e625804578d3c403c834de839c6dc5c1e8a6 fix assertion on address list, it may be empty Fixes #3237. --- diff --git a/nominatim/api/results.py b/nominatim/api/results.py index 469f06d9..829008fb 100644 --- a/nominatim/api/results.py +++ b/nominatim/api/results.py @@ -500,7 +500,7 @@ def _get_address_lookup_id(result: BaseResultT) -> int: async def _finalize_entry(conn: SearchConnection, result: BaseResultT) -> None: - assert result.address_rows + assert result.address_rows is not None postcode = result.postcode if not postcode and result.address: postcode = result.address.get('postcode')