Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit e2ecf51

Browse files
committed
prevent infinite redirect loop
1 parent b376840 commit e2ecf51

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CodeChallenge/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def send_landing(path):
9999
def catch_all(path):
100100

101101
# show landing page
102-
if core.current_rank() == -1 and not path or path == "home":
102+
if core.current_rank() == -1 and (not path or path == "home"):
103103
return redirect("/landing")
104104

105105
return send_from_directory(app.config["DIST_DIR"], "index.html")

CodeChallenge/cli/questions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def q_replace(title, answer, rank, asset):
7474
success = del_question(oldq.id)
7575

7676
if not success:
77-
print("error occured while trying to delete original question")
77+
print("error occurred while trying to delete original question")
7878
print(f"old question id was: {oldq.id}")
7979
return
8080
else:

0 commit comments

Comments
 (0)