This commit is contained in:
2024-08-07 08:57:56 +03:00
parent 1d4fa4b977
commit 60a56fd098
27 changed files with 40 additions and 40 deletions

9
utils/encoders.py Normal file
View File

@@ -0,0 +1,9 @@
import json
from decimal import Decimal
class CustomJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, Decimal):
return str(obj)
return super().default(obj)