Skip to content

Commit

Permalink
fix assertion on address list, it may be empty
Browse files Browse the repository at this point in the history
Fixes #3237.
  • Loading branch information
lonvia committed Oct 31, 2023
1 parent afb439b commit 2bf8e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nominatim/api/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 2bf8e62

Please sign in to comment.