[openaddresses] for configs with add_osm_boundaries=true, skip adding boundary fields from the OA file altogether when they're specified

This commit is contained in:
Al
2016-09-16 01:55:36 -04:00
parent 95cf6ad0fa
commit d667039397

View File

@@ -277,6 +277,8 @@ class OpenAddressesFormatter(object):
value = self.spanish_street_name(value)
if key in AddressFormatter.BOUNDARY_COMPONENTS and key != AddressFormatter.POSTCODE:
if add_osm_boundaries:
continue
value = self.components.cleaned_name(value, first_comma_delimited_phrase=True)
if value and (len(value) < 2 or is_numeric(value)):
continue