core/utils/encoders.py
Untone edece36ecc
All checks were successful
Deploy on push / deploy (push) Successful in 12s
jsonenc-fix
2025-03-20 11:59:43 +03:00

11 lines
227 B
Python

from decimal import Decimal
from json import JSONEncoder
class CustomJSONEncoder(JSONEncoder):
def default(self, obj):
if isinstance(obj, Decimal):
return str(obj)
return super().default(obj)