]> git.openstreetmap.org Git - nominatim.git/commitdiff
fix assertion on address list, it may be empty
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 31 Oct 2023 20:10:23 +0000 (21:10 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 31 Oct 2023 20:10:54 +0000 (21:10 +0100)
Fixes #3237.

nominatim/api/results.py

index 469f06d98703a6a960d3eb26663cb5331a1bdb48..829008fb3ec316a09a753b39cb720404b1c8d98b 100644 (file)
@@ -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')