From 3d4b27901375f3fb32996ab06940eba76445d6e1 Mon Sep 17 00:00:00 2001 From: PimpMyShell <75995586+PimpMyShell@users.noreply.github.com> Date: Mon, 4 Mar 2024 00:18:38 +0100 Subject: [PATCH] fix: debug mod and variable name --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 15293ad..df63994 100644 --- a/app.py +++ b/app.py @@ -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')) @@ -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"])