diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-07-10 18:41:08 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-07-10 18:41:08 +0100 |
commit | 491f9ed6796b1aa34437f3247cb8956c928b1143 (patch) | |
tree | 3f67a5d5c1857f820959706c3249eaf0033884ab /app/blueprints/users/claim.py | |
parent | 000259fc8875e8577500d4e60ba3c5b5898f56d8 (diff) | |
download | cheatdb-491f9ed6796b1aa34437f3247cb8956c928b1143.tar.xz |
Fix GitHub claim method being broken by phpBB update
Diffstat (limited to 'app/blueprints/users/claim.py')
-rw-r--r-- | app/blueprints/users/claim.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/blueprints/users/claim.py b/app/blueprints/users/claim.py index 4e0f1ec..5f6a25b 100644 --- a/app/blueprints/users/claim.py +++ b/app/blueprints/users/claim.py @@ -30,6 +30,7 @@ def claim(): username = "" else: method = request.args.get("method") + user = User.query.filter_by(forums_username=username).first() if user and user.rank.atLeast(UserRank.NEW_MEMBER): flash("User has already been claimed", "danger") @@ -37,7 +38,7 @@ def claim(): elif method == "github": if user is None or user.github_username is None: flash("Unable to get Github username for user", "danger") - return redirect(url_for("users.claim")) + return redirect(url_for("users.claim", username=username)) else: return redirect(url_for("github.start")) elif user is None and request.method == "POST": |