fix(aurora): fixed the jsonencoder converting timedeltas to strings using str()
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 29s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 41s

This commit is contained in:
Seaswimmer 2024-08-19 14:49:04 -04:00
parent 3d3036f9b6
commit dc407c1125
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -14,7 +14,8 @@ class JSONEncoder(json.JSONEncoder):
case datetime(): case datetime():
return int(o.timestamp()) return int(o.timestamp())
case timedelta(): case timedelta():
return str(o) from ..utilities.utils import timedelta_to_string
return timedelta_to_string(o)
case AuroraBaseModel(): case AuroraBaseModel():
return o.dump() return o.dump()
case Type(): case Type():