From 29081c00e947970c20cfe377a361c968f3c2021e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sondre=20Gr=C3=B8n=C3=A5s?= <44143748+sondregronas@users.noreply.github.com> Date: Mon, 26 Aug 2024 00:16:50 +0200 Subject: [PATCH] Update app.py --- piggy/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piggy/app.py b/piggy/app.py index e95501e..00fb8cb 100644 --- a/piggy/app.py +++ b/piggy/app.py @@ -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