mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Do not add random entries into the transactions because the user is given invalid negative tokens
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user