fix(moderation): use json instead of a list object
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 52s

This commit is contained in:
Seaswimmer 2023-12-14 16:54:58 -05:00
parent d88986cf0d
commit b435441356
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -190,7 +190,7 @@ class Moderation(commands.Cog):
(moderation_id, timestamp, moderation_type, target_id, moderator_id, role_id, duration, end_timestamp, reason, resolved, resolved_by, resolve_reason, expired, changes)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
"""
insert_values = (0, 0, "NULL", 0, 0, 0, "NULL", 0, "NULL", 0, "NULL", "NULL", 0, [])
insert_values = (0, 0, "NULL", 0, 0, 0, "NULL", 0, "NULL", 0, "NULL", "NULL", 0, json.dumps([]))
cursor.execute(insert_query, insert_values)
database.commit()
@ -276,7 +276,7 @@ class Moderation(commands.Cog):
"resolved_by": result[10],
"resolve_reason": result[11],
"expired": result[12],
"changes": result[13]
"changes": json.loads(result[13])
}
return case