From d70662e6d7d44f4f1c38947c17c6016d345efbb2 Mon Sep 17 00:00:00 2001 From: Al Date: Fri, 2 Sep 2016 04:42:34 -0400 Subject: [PATCH] [fix] postcodes --- scripts/geodata/openaddresses/formatter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/geodata/openaddresses/formatter.py b/scripts/geodata/openaddresses/formatter.py index fe3301a8..ae3433dd 100644 --- a/scripts/geodata/openaddresses/formatter.py +++ b/scripts/geodata/openaddresses/formatter.py @@ -296,9 +296,9 @@ class OpenAddressesFormatter(object): if key == AddressFormatter.HOUSE_NUMBER and is_netherlands: value = self.dutch_house_number(value) - if key in AddressFormatter.BOUNDARY_COMPONENTS: + if key in AddressFormatter.BOUNDARY_COMPONENTS and key != AddressFormatter.POSTCODE: value = self.components.cleaned_name(value, first_comma_delimited_phrase=True) - if value and len(value) < 2 or is_numeric(value): + if value and (len(value) < 2 or is_numeric(value)): continue if not_applicable_regex.match(value) or null_regex.match(value) or unknown_regex.match(value):