We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8477e95 commit 8cb6687Copy full SHA for 8cb6687
apps/application/models/application.py
@@ -7,6 +7,7 @@
7
@desc:
8
"""
9
import datetime
10
+import decimal
11
import json
12
import uuid
13
@@ -140,6 +141,8 @@ def default(self, obj):
140
141
return str(obj)
142
if isinstance(obj, datetime.datetime):
143
return obj.strftime("%Y-%m-%d %H:%M:%S")
144
+ if isinstance(obj, decimal.Decimal):
145
+ return float(obj)
146
else:
147
return json.JSONEncoder.default(self, obj)
148
0 commit comments