Added conn.commit() in /change

This commit is contained in:
2000-Trek 2023-06-23 19:08:14 +02:00
parent ea94680dc3
commit df320bea8b

View file

@ -146,6 +146,7 @@ def change():
if users != []: if users != []:
balance_old = users[0][2] balance_old = users[0][2]
c.execute(f"UPDATE users SET balance = balance + {change} WHERE id={user_id}") c.execute(f"UPDATE users SET balance = balance + {change} WHERE id={user_id}")
conn.commit()
c.execute(f"SELECT * FROM users WHERE id={user_id}") c.execute(f"SELECT * FROM users WHERE id={user_id}")
user = c.fetchall()[0] user = c.fetchall()[0]
db_log.info(f"Changed the balance from user {user[0]} from {balance_old} to {user[2]}") db_log.info(f"Changed the balance from user {user[0]} from {balance_old} to {user[2]}")