[fix] KeyError

This commit is contained in:
Al
2016-07-31 18:29:29 -04:00
parent 92b8566930
commit d04a627e92

View File

@@ -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)