From 2bf8e625804578d3c403c834de839c6dc5c1e8a6 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 31 Oct 2023 21:10:23 +0100 Subject: [PATCH] fix assertion on address list, it may be empty Fixes #3237. --- nominatim/api/results.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nominatim/api/results.py b/nominatim/api/results.py index 469f06d987..829008fb3e 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')