Add a python_type constructor (used by EncryptedType)
This commit is contained in:
@@ -95,6 +95,9 @@ class PhoneNumberType(types.TypeDecorator, ScalarCoercible):
|
||||
STORE_FORMAT = 'e164'
|
||||
impl = types.Unicode(20)
|
||||
|
||||
def python_type(self, text):
|
||||
return self._coerce(text)
|
||||
|
||||
def __init__(self, country_code='US', max_length=20, *args, **kwargs):
|
||||
# Bail if phonenumbers is not found.
|
||||
if phonenumbers is None:
|
||||
|
Reference in New Issue
Block a user