From ca7c0d8d7cc1e4b300b55fcc6a0aad76e061fd97 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 4 May 2024 15:33:49 -0400 Subject: [PATCH] fix(aurora): use pydantic basemodels instead of the Moderation model --- aurora/utilities/json.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aurora/utilities/json.py b/aurora/utilities/json.py index bac1668..c3e79a3 100644 --- a/aurora/utilities/json.py +++ b/aurora/utilities/json.py @@ -1,7 +1,7 @@ import json from datetime import datetime, timedelta -from aurora.models import Moderation +from pydantic import BaseModel class JSONEncoder(json.JSONEncoder): @@ -10,7 +10,7 @@ class JSONEncoder(json.JSONEncoder): return int(o.timestamp()) if isinstance(o, timedelta): return str(o) - if isinstance(o, Moderation): + if isinstance(o, BaseModel): return o.model_dump() return super().default(o)