fixed SQLCustomType represent

This commit is contained in:
Massimo DiPierro
2012-06-05 10:57:21 -05:00
parent 6675963f7b
commit 5766476fa1
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-06-05 00:02:52) dev
Version 2.00.0 (2012-06-05 10:57:17) dev
+4 -1
View File
@@ -1482,7 +1482,10 @@ class BaseAdapter(ConnectionPool):
if isinstance(obj, CALLABLETYPES):
obj = obj()
if isinstance(fieldtype, SQLCustomType):
return fieldtype.encoder(obj)
value = fieldtype.encoder(obj)
if fieldtype.native in ('string','text'):
return self.adapt(value)
return value
if isinstance(obj, (Expression, Field)):
return str(obj)
if fieldtype.startswith('list:'):