Fix NULL values with SQLCustomType

This commit is contained in:
ilvalle
2014-11-30 19:53:33 +01:00
parent a1524d4da4
commit 6228de8e10
+1 -1
View File
@@ -1323,7 +1323,7 @@ class BaseAdapter(ConnectionPool):
value = fieldtype.encoder(obj)
if fieldtype.type in ('string','text', 'json'):
return self.adapt(value)
return value
return value or 'NULL'
if isinstance(obj, (Expression, Field)):
return str(obj)
if field_is_type('list:'):