From b296b9b299fa4d07bedc25c791d1a039d4b9fb72 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Mon, 30 Jul 2018 00:42:11 +0100 Subject: Fix two bugs --- app/views/githublogin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/githublogin.py') diff --git a/app/views/githublogin.py b/app/views/githublogin.py index defdad1..9ea2584 100644 --- a/app/views/githublogin.py +++ b/app/views/githublogin.py @@ -51,9 +51,9 @@ def github_authorized(oauth_token): if current_user and current_user.is_authenticated: if userByGithub is None: current_user.github_username = username - db.session.add(auth) db.session.commit() - return redirect(url_for("gitAccount", id=auth.id)) + flash("Linked github to account", "success") + return redirect(url_for("home_page")) else: flash("Github account is already associated with another user", "danger") return redirect(url_for("home_page")) -- cgit v1.2.3