From 3f6aec0a82d05c648750c8936b0ad6af3fd0caa8 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 4 May 2024 20:55:11 -0400 Subject: [PATCH] fix(aurora): don't JSON serialize the Red class --- aurora/utilities/json.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aurora/utilities/json.py b/aurora/utilities/json.py index aad7be7..cad264e 100644 --- a/aurora/utilities/json.py +++ b/aurora/utilities/json.py @@ -1,6 +1,9 @@ import json from datetime import datetime, timedelta +from redbot.core.bot import Red + + from aurora.models import AuroraBaseModel @@ -12,6 +15,8 @@ class JSONEncoder(json.JSONEncoder): return str(o) if isinstance(o, AuroraBaseModel): return o.to_json() + if isinstance(o, Red): + return None return super().default(o)