aboutsummaryrefslogtreecommitdiff
path: root/app/views/githublogin.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-07-30 00:42:11 +0100
committerrubenwardy <rw@rubenwardy.com>2018-07-30 00:42:11 +0100
commitb296b9b299fa4d07bedc25c791d1a039d4b9fb72 (patch)
tree357b0ff3ffac9b2989f35fe8e848ce3005aeee6e /app/views/githublogin.py
parentdd6257a0a042f1ae82bcd00c999fade3746abdbf (diff)
downloadcheatdb-b296b9b299fa4d07bedc25c791d1a039d4b9fb72.tar.xz
Fix two bugs
Diffstat (limited to 'app/views/githublogin.py')
-rw-r--r--app/views/githublogin.py4
1 files changed, 2 insertions, 2 deletions
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"))