From 72771741c38d949b4786d08688b3589cf0e6b7c7 Mon Sep 17 00:00:00 2001 From: Al Date: Sat, 10 Dec 2016 15:16:35 -0500 Subject: [PATCH] [fix] order --- scripts/geodata/addresses/components.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/geodata/addresses/components.py b/scripts/geodata/addresses/components.py index dc2af15d..915f566a 100644 --- a/scripts/geodata/addresses/components.py +++ b/scripts/geodata/addresses/components.py @@ -348,6 +348,8 @@ class AddressComponents(object): same_name_as_original = True break + 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) if name_equal and component == tag: continue @@ -356,8 +358,6 @@ class AddressComponents(object): is_state = False - containing_ids = [(c['type'], c['id']) for c in osm_components[i + 1:] if 'type' in c and 'id' in c] - if component is not None: for cn in component_names: components[cn.lower()].add(component)