Added conn.commit() in /change
This commit is contained in:
parent
ea94680dc3
commit
df320bea8b
1 changed files with 1 additions and 0 deletions
1
main.py
1
main.py
|
@ -146,6 +146,7 @@ def change():
|
|||
if users != []:
|
||||
balance_old = users[0][2]
|
||||
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}")
|
||||
user = c.fetchall()[0]
|
||||
db_log.info(f"Changed the balance from user {user[0]} from {balance_old} to {user[2]}")
|
||||
|
|
Loading…
Reference in a new issue