fix(aurora): fixed the jsonencoder converting timedeltas to strings using str()
This commit is contained in:
parent
3d3036f9b6
commit
dc407c1125
1 changed files with 2 additions and 1 deletions
|
@ -14,7 +14,8 @@ class JSONEncoder(json.JSONEncoder):
|
|||
case datetime():
|
||||
return int(o.timestamp())
|
||||
case timedelta():
|
||||
return str(o)
|
||||
from ..utilities.utils import timedelta_to_string
|
||||
return timedelta_to_string(o)
|
||||
case AuroraBaseModel():
|
||||
return o.dump()
|
||||
case Type():
|
||||
|
|
Loading…
Reference in a new issue