mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 18:37:58 +00:00
ignore postcode areas in countries without postcodes properly
This commit is contained in:
@@ -234,10 +234,10 @@ def _update_postcode_areas(conn: Connection, analyzer: AbstractAnalyzer,
|
||||
country_code = cc
|
||||
fmt = matcher.get_matcher(country_code)
|
||||
pcs = []
|
||||
assert fmt is not None
|
||||
|
||||
if (m := fmt.match(postcode)):
|
||||
pcs.append({'out': fmt.normalize(m), 'in': postcode})
|
||||
if fmt is not None:
|
||||
if (m := fmt.match(postcode)):
|
||||
pcs.append({'out': fmt.normalize(m), 'in': postcode})
|
||||
|
||||
if country_code is not None and pcs:
|
||||
_insert_postcode_areas(conn, country_code,
|
||||
|
||||
Reference in New Issue
Block a user