WIP: Moderation type registry #26

Closed
cswimr wants to merge 146 commits from aurora-3rd-party into main
Showing only changes of commit 2da76eb51a - Show all commits

View file

@ -68,3 +68,11 @@ class Moderation(BaseModel):
return cls(**case) return cls(**case)
return None return None
class JSONEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, datetime):
return o.timestamp()
if isinstance(o, timedelta):
return str(o)
return super().default(o)