Skip to content

Commit

Permalink
Fixed middleware bug and translation error (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
njal3001 committed Mar 21, 2023
1 parent 8ffd961 commit 605f575
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions website/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ msgid ""
"Vaktordningen sørger for at du alltid møter noen på verkstedet klare til å "
"demonstrere utstyr eller hjelpe deg."
msgstr ""
"The on-call system ensures that you always meet someone in the workshop "
"ready to demonstrate equipment or help you."

#: templates/website/index.html:59
msgid "Les mer om oss her"
Expand Down
2 changes: 1 addition & 1 deletion website/middleware/remove_accept_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def __init__(self, get_response):
self.get_response = get_response

def __call__(self, request):
if request.META["HTTP_ACCEPT_LANGUAGE"]:
if "HTTP_ACCEPT_LANGUAGE" in request.META:
del request.META["HTTP_ACCEPT_LANGUAGE"]

response = self.get_response(request)
Expand Down

0 comments on commit 605f575

Please sign in to comment.