Do not add random entries into the transactions because the user is given invalid negative tokens

This commit is contained in:
Jeremy Zhang 2017-11-03 03:05:38 +00:00
parent a2b2cce815
commit c9e7d22730

View File

@ -22,8 +22,6 @@ def set_titan_token(user_id, amt_change, action):
else:
token_count = 0
token_usr = TitanTokens(user_id, 0)
db.session.add(token_usr)
db.session.commit()
new_token_count = token_count + amt_change
if new_token_count < 0:
return False