[addresses] only use ordinal for digits

This commit is contained in:
Al
2016-05-19 02:40:19 -04:00
parent d63031a260
commit a20b43cd28
2 changed files with 5 additions and 3 deletions

View File

@@ -297,7 +297,7 @@ class AddressComponents(object):
combo = weighted_choice(values, probs)
if combo is not None:
components = OrderedDict.fromkeys(combo['components']).keys()
if not all((c in address_components and (c in generated_components or address_components[c].isdigit()) for c in components)):
if not all((c in address_components and (c in generated_components or self.is_numeric(address_components[c])) for c in components)):
return None
values = []