diff --git a/scripts/geodata/addresses/components.py b/scripts/geodata/addresses/components.py index 682a4b94..f01d08bc 100644 --- a/scripts/geodata/addresses/components.py +++ b/scripts/geodata/addresses/components.py @@ -232,7 +232,7 @@ class AddressComponents(object): if not name: continue - containing_ids = [(c['type'], c['id']) for c in osm_components[i + 1:]] + containing_ids = [(c['type'], c['id']) for c in osm_components[i + 1:] if 'type' in c and 'id' in c] component = osm_address_components.component_from_properties(country, props, containing=containing_ids)