Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sondregronas authored Aug 25, 2024
1 parent b470c7b commit 29081c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion piggy/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_assignment_wildcard(path="", lang=""):
raise PiggyHTTPException("Assignment not found", status_code=404)

# If we are at the final level (assignment), get lang from the cookies (valid requests only)
if len(path.split("/")) == AssignmentTemplate.ASSIGNMENT.index and request:
if len(path.split("/")) == AssignmentTemplate.ASSIGNMENT.index and request and not lang:
lang = request.cookies.get("lang", "") # "" = default language (Norwegian

# Render the appropriate template for the current level
Expand Down

0 comments on commit 29081c0

Please sign in to comment.