[osm] drop postcode as well for address-only format
This commit is contained in:
@@ -852,8 +852,11 @@ class OSMAddressFormatter(object):
|
|||||||
# However, where there are streets, it's useful to have address-only queries as well
|
# However, where there are streets, it's useful to have address-only queries as well
|
||||||
if country != JAPAN:
|
if country != JAPAN:
|
||||||
address_only_components = self.components.drop_places(address_components)
|
address_only_components = self.components.drop_places(address_components)
|
||||||
formatted_addresses.extend(self.formatted_addresses_with_venue_names(address_only_components, venue_names, country, language=language,
|
address_only_components = self.components.drop_postcode(address_only_components)
|
||||||
tag_components=tag_components, minimal_only=False))
|
|
||||||
|
if address_only_components:
|
||||||
|
formatted_addresses.extend(self.formatted_addresses_with_venue_names(address_only_components, venue_names, country, language=language,
|
||||||
|
tag_components=tag_components, minimal_only=False))
|
||||||
|
|
||||||
# Generate a PO Box address at random (only returns non-None values occasionally) and add it to the list
|
# Generate a PO Box address at random (only returns non-None values occasionally) and add it to the list
|
||||||
po_box_components = self.components.po_box_address(address_components, language, country=country)
|
po_box_components = self.components.po_box_address(address_components, language, country=country)
|
||||||
|
|||||||
Reference in New Issue
Block a user