WIP: Moderation type registry #26
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