From de04b7db8f76911f3422156d72b4c5f7dda7bba9 Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 14 Nov 2018 01:55:01 +1000 Subject: [PATCH] god damn it i keep forgetting to commit to the db --- web.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web.py b/web.py index 343e1aa..3a1471b 100755 --- a/web.py +++ b/web.py @@ -162,6 +162,7 @@ def internal_auth_b(): #user already has an account with CG #update the user's info to use the new info we just got, then redirect them to the login page c.execute("UPDATE data SET client_id = %s, client_secret = %s, secret = %s, avi = %s WHERE username = %s AND instance = %s", (session['client_id'], session['client_secret'], session['secret'], session['avi'], session['username'], session['instance'])) + db.commit() db.close() return redirect(url_for('log_in')) else: @@ -199,7 +200,7 @@ def create_password(): #user already exists in database, so they already have a password db.close() return redirect(url_for('main')) - + @app.route('/internal/create_account', methods=['POST']) def create_account(): db, c, dc = db_reconnect()