[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)

This commit is contained in:
Al
2016-08-01 18:29:32 -04:00
parent e11c723f8b
commit 818bd50105

View File

@@ -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