WIP: Refactor Aurora (3.0.0) #29

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

View file

@ -1,7 +1,7 @@
import json import json
from datetime import datetime, timedelta from datetime import datetime, timedelta
from aurora.models import AuroraBaseModel from aurora.models import AuroraBaseModel, AuroraGuildModel
class JSONEncoder(json.JSONEncoder): class JSONEncoder(json.JSONEncoder):
@ -12,6 +12,8 @@ class JSONEncoder(json.JSONEncoder):
return str(o) return str(o)
if isinstance(o, AuroraBaseModel): if isinstance(o, AuroraBaseModel):
return o.to_json() return o.to_json()
if isinstance(o, AuroraGuildModel):
return o.to_json()
return super().default(o) return super().default(o)