This commit is contained in:
parent
72aa96a99f
commit
c905666591
|
@ -1,3 +1,4 @@
|
||||||
|
import json
|
||||||
import math
|
import math
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
@ -52,8 +53,8 @@ class Base(declarative_base()):
|
||||||
for c in column_names:
|
for c in column_names:
|
||||||
value = getattr(self, c)
|
value = getattr(self, c)
|
||||||
if isinstance(value, JSON):
|
if isinstance(value, JSON):
|
||||||
# Cast JSON column to string
|
# save JSON column as dict
|
||||||
data[c] = str(value)
|
data[c] = json.loads(str(value))
|
||||||
else:
|
else:
|
||||||
data[c] = value
|
data[c] = value
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in New Issue
Block a user