From 818bd50105b6ceaceb0d8bd32b97302d29d1952f Mon Sep 17 00:00:00 2001 From: Al Date: Mon, 1 Aug 2016 18:29:32 -0400 Subject: [PATCH] [fix] unit phrase should return None if there's no config available for a particular zone type (again enforcing the idea that venues typically don't have sub-building information) --- scripts/geodata/addresses/units.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/geodata/addresses/units.py b/scripts/geodata/addresses/units.py index ded3a043..1c885b7d 100644 --- a/scripts/geodata/addresses/units.py +++ b/scripts/geodata/addresses/units.py @@ -196,6 +196,9 @@ class Unit(NumberedComponent): if unit is not None: key = 'units.alphanumeric' if zone is None else 'units.zones.{}'.format(zone) + if not address_config.get_property(key, language, country=country): + return None + is_alpha = safe_decode(unit).isalpha() direction_unit = None