mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 18:11:23 +01:00
Do not add random entries into the transactions because the user is given invalid negative tokens
This commit is contained in:
parent
a2b2cce815
commit
c9e7d22730
@ -22,8 +22,6 @@ def set_titan_token(user_id, amt_change, action):
|
|||||||
else:
|
else:
|
||||||
token_count = 0
|
token_count = 0
|
||||||
token_usr = TitanTokens(user_id, 0)
|
token_usr = TitanTokens(user_id, 0)
|
||||||
db.session.add(token_usr)
|
|
||||||
db.session.commit()
|
|
||||||
new_token_count = token_count + amt_change
|
new_token_count = token_count + amt_change
|
||||||
if new_token_count < 0:
|
if new_token_count < 0:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user