fix(moderation): dump changes to json before adding to mysql database
This commit is contained in:
parent
bde7c69086
commit
43528397e8
1 changed files with 1 additions and 1 deletions
|
@ -1152,7 +1152,7 @@ class Moderation(commands.Cog):
|
||||||
db = await self.config.mysql_database()
|
db = await self.config.mysql_database()
|
||||||
|
|
||||||
update_query = f"UPDATE `{db}`.`moderation_{interaction.guild.id}` SET changes = %s, reason = %s WHERE moderation_id = %s"
|
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()
|
database.commit()
|
||||||
|
|
||||||
new_case = await self.fetch_case(case_number, interaction.guild.id)
|
new_case = await self.fetch_case(case_number, interaction.guild.id)
|
||||||
|
|
Loading…
Reference in a new issue