Merge branch 'master' of github.com:kvesteri/sqlalchemy-utils
This commit is contained in:
@@ -16,7 +16,7 @@ from .scalar_coercible import ScalarCoercible
|
||||
class ArrowType(types.TypeDecorator, ScalarCoercible):
|
||||
"""
|
||||
ArrowType provides way of saving Arrow_ objects into database. It
|
||||
automatically changes Arrow_ objects to datatime objects on the way in and
|
||||
automatically changes Arrow_ objects to datetime objects on the way in and
|
||||
datetime objects back to Arrow_ objects on the way out (when querying
|
||||
database). ArrowType needs Arrow_ library installed.
|
||||
|
||||
|
@@ -107,7 +107,10 @@ class PhoneNumberType(types.TypeDecorator, ScalarCoercible):
|
||||
|
||||
def process_bind_param(self, value, dialect):
|
||||
if value:
|
||||
if isinstance(value, PhoneNumber):
|
||||
return getattr(value, self.STORE_FORMAT)
|
||||
else:
|
||||
return getattr(PhoneNumber(value), self.STORE_FORMAT)
|
||||
return value
|
||||
|
||||
def process_result_value(self, value, dialect):
|
||||
|
Reference in New Issue
Block a user