fix(aurora): updated utilities.json.JSONEncoder to match the model change I just made
This commit is contained in:
parent
6520f4f2b9
commit
a7d8f452d1
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue