Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: debug mod and variable name #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def run_instance():
challenge_name = request.form.get("challenge_name", None)

# Disable captcha on debug mode
if not current_app.config["ENABLE_RECAPTCHA"] and not recaptcha.verify():
if not current_app.config["DEBUG"] and current_app.config["ENABLE_RECAPTCHA"] and not recaptcha.verify():
flash("Captcha failed.", "red")
return redirect(url_for('index'))

Expand All @@ -222,8 +222,8 @@ def run_instance():
flash("The challenge name is not valid.", "red")
return redirect(url_for('index'))

if get_challenge_count_per_team(session["team_id"]) >= MAX_CHALLENGES_PER_TEAM:
flash(f"Your team has reached the maximum number of concurrent running instances ({MAX_CHALLENGES_PER_TEAM}).", "red")
if get_challenge_count_per_team(session["team_id"]) >= MAX_INSTANCE_PER_TEAM:
flash(f"Your team has reached the maximum number of concurrent running instances ({MAX_INSTANCE_PER_TEAM}).", "red")
return redirect(url_for('index'))

remove_user_running_instance(session["user_id"])
Expand Down