From 43528397e8ec975af8ae91c942a0249b065d287c Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 14 Dec 2023 19:42:19 -0500 Subject: [PATCH] fix(moderation): dump changes to json before adding to mysql database --- moderation/moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index a05314c..b07c070 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -1152,7 +1152,7 @@ class Moderation(commands.Cog): db = await self.config.mysql_database() update_query = f"UPDATE `{db}`.`moderation_{interaction.guild.id}` SET changes = %s, reason = %s WHERE moderation_id = %s" - cursor.execute(update_query, (changes, reason, case_number)) + cursor.execute(update_query, (json.dumps(changes), reason, case_number)) database.commit() new_case = await self.fetch_case(case_number, interaction.guild.id)