[openaddresses] fixing street requirement

This commit is contained in:
Al
2017-02-11 03:29:09 -05:00
parent 2dff6c8839
commit 9af4b1bd42

View File

@@ -427,7 +427,7 @@ class OpenAddressesFormatter(object):
components[AddressFormatter.POSTCODE] = PostalCodes.add_country_code(postcode, country)
# If there's a postcode, we can still use just the city/state/postcode, otherwise discard
if (not street and street_required and not house_number) or (street and house_number and (street.lower() == house_number.lower())) or (unit and street and street.lower() == unit.lower()):
if (not street and street_required) or (street and house_number and (street.lower() == house_number.lower())) or (unit and street and street.lower() == unit.lower()):
if not postcode:
continue
components = self.components.drop_address(components)