fix(moderation): use json instead of a list object
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 52s
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 52s
This commit is contained in:
parent
d88986cf0d
commit
b435441356
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue