[openaddresses] Also skipping addresses where street == unit

This commit is contained in:
Al
2016-08-24 14:10:41 -04:00
parent f66fb4a172
commit d250f58293

View File

@@ -184,6 +184,10 @@ class OpenAddressesFormatter(object):
continue
unit = components.get(AddressFormatter.UNIT, None)
if unit and street and street.lower() == unit.lower():
continue
if unit is not None:
if is_numeric_strict(unit):
unit = Unit.phrase(unit, language, country=country)