From c9e7d22730c7eeec57027b4a20f7e9ac4dfe8e1f Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Fri, 3 Nov 2017 03:05:38 +0000 Subject: [PATCH] Do not add random entries into the transactions because the user is given invalid negative tokens --- webapp/titanembeds/database/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/webapp/titanembeds/database/__init__.py b/webapp/titanembeds/database/__init__.py index 0374ccb..e0e39ba 100644 --- a/webapp/titanembeds/database/__init__.py +++ b/webapp/titanembeds/database/__init__.py @@ -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