fix(aurora): convert float timestamps to integers
All checks were successful
Actions / Build Documentation (MkDocs) (pull_request) Successful in 33s
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 48s

This commit is contained in:
Seaswimmer 2024-05-04 14:19:48 -04:00
parent 2da76eb51a
commit e8ca0aeb1c
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -72,7 +72,7 @@ class Moderation(BaseModel):
class JSONEncoder(json.JSONEncoder): class JSONEncoder(json.JSONEncoder):
def default(self, o): def default(self, o):
if isinstance(o, datetime): if isinstance(o, datetime):
return o.timestamp() return int(o.timestamp())
if isinstance(o, timedelta): if isinstance(o, timedelta):
return str(o) return str(o)
return super().default(o) return super().default(o)