From 16af26f93e4a0bfe56250ba27929fa259dbd4eff Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Mon, 6 May 2024 15:11:11 -0400 Subject: [PATCH] fix(aurora): fixed a logging statement --- aurora/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aurora/models.py b/aurora/models.py index 20b1bf4..396671e 100644 --- a/aurora/models.py +++ b/aurora/models.py @@ -1,3 +1,4 @@ +import json import sqlite3 from datetime import datetime, timedelta from time import time @@ -106,7 +107,7 @@ class Moderation(AuroraGuildModel): )) cursor.close() - logger.info("Row updated in moderation_%s!\n%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s", + logger.debug("Row updated in moderation_%s!\n%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s", self.moderation_id, self.guild_id, self.timestamp.timestamp(), @@ -278,6 +279,9 @@ class Change(AuroraBaseModel): @classmethod def from_dict(cls, bot: Red, data: dict) -> "Change": logger.debug("Creating Change from dict (%s): %s", type(data), data) + if isinstance(data, str): + data = json.loads(data) + logger.debug("Change data was a string, converted to dict: %s", data) if "duration" in data and data["duration"] and not isinstance(data["duration"], timedelta): hours, minutes, seconds = map(int, data["duration"].split(':')) duration = timedelta(hours=hours, minutes=minutes, seconds=seconds)