From 9ff0497c90e68a8093929bd70319604ab919a8ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Ba=C3=B1ados=20Schwerter?= Date: Mon, 20 Jan 2025 20:28:22 +0000 Subject: [PATCH] Reuqest before logout to avoid changes --- src/morphodict/frontend/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/morphodict/frontend/views.py b/src/morphodict/frontend/views.py index 0735b51e9..58735b652 100644 --- a/src/morphodict/frontend/views.py +++ b/src/morphodict/frontend/views.py @@ -95,8 +95,9 @@ def index(request): # pragma: no cover else: groupnames = [x["name"] for x in request.user.groups.values("name")] if settings.MORPHODICT_REQUIRES_LOGIN_IN_GROUP not in groupnames: + path = request.path logout(request) - return redirect("/accounts/login/?next=%s" % request.path) + return redirect("/accounts/login/?next=%s" % path) user_query = request.GET.get("q", None) dict_source = get_dict_source(request)