fixed json field representation
This commit is contained in:
+7
-7
@@ -2037,13 +2037,13 @@ class BaseAdapter(ConnectionPool):
|
|||||||
else:
|
else:
|
||||||
obj = str(obj)
|
obj = str(obj)
|
||||||
elif fieldtype == 'json':
|
elif fieldtype == 'json':
|
||||||
if not self.native_json:
|
# always pass a string JSON string
|
||||||
if have_serializers:
|
if have_serializers:
|
||||||
obj = serializers.json(obj)
|
obj = serializers.json(obj)
|
||||||
elif simplejson:
|
elif simplejson:
|
||||||
obj = simplejson.dumps(obj)
|
obj = simplejson.dumps(obj)
|
||||||
else:
|
else:
|
||||||
raise RuntimeError("missing simplejson")
|
raise RuntimeError("missing simplejson")
|
||||||
if not isinstance(obj, bytes):
|
if not isinstance(obj, bytes):
|
||||||
obj = bytes(obj)
|
obj = bytes(obj)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user