fix(aurora): updated utilities.json.JSONEncoder to match the model change I just made
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 21s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 31s

This commit is contained in:
Seaswimmer 2024-05-04 18:23:24 -04:00
parent 6520f4f2b9
commit a7d8f452d1
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

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