Skip to content

Commit

Permalink
Reuqest before logout to avoid changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fbanados committed Jan 20, 2025
1 parent 7cf98c7 commit 9ff0497
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/morphodict/frontend/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9ff0497

Please sign in to comment.