updated verify logic to accomedate confirmed users who forgot their discord access token

This commit is contained in:
2026-01-18 11:25:10 +01:00
parent 6d9f96efd9
commit 9bde723747

View File

@@ -100,8 +100,11 @@ def verify_email(token):
user = Participant.query.filter_by(email=email).first_or_404()
if get_confirmed_count() >= current_app.config['MAX_SPOTS']:
if user.confirmed:
return render_template('success.html', message="You are confirmed", discord_link=current_app.config['DISCORD_LINK'], discord_token=user.discord_token)
else:
return render_template("error.html", error_message="Sorry! The event filled up while you were verifying.")
else:
user.confirmed = True
db.session.commit()