WIP: Refactor Aurora (3.0.0) #29
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue