WIP: Refactor Aurora (3.0.0) #29

Draft
cswimr wants to merge 347 commits from aurora-pydantic into main
Showing only changes of commit ca7c0d8d7c - Show all commits

View file

@ -1,7 +1,7 @@
import json
from datetime import datetime, timedelta
from aurora.models import Moderation
from pydantic import BaseModel
class JSONEncoder(json.JSONEncoder):
@ -10,7 +10,7 @@ class JSONEncoder(json.JSONEncoder):
return int(o.timestamp())
if isinstance(o, timedelta):
return str(o)
if isinstance(o, Moderation):
if isinstance(o, BaseModel):
return o.model_dump()
return super().default(o)