fixed logout absolute url building on logout

This commit is contained in:
Adolfo Gómez García 2022-08-24 11:08:56 +02:00
parent e5e8ad5fbd
commit 739b0c7f81

View File

@ -422,8 +422,7 @@ def webLogout(
Helper function to clear user related data from session. If this method is not used, the session we be cleaned anyway
by django in regular basis.
"""
if exit_url is None:
exit_url = reverse('page.login')
exit_url = exit_url or reverse('page.login')
try:
if request.user:
authenticator = request.user.manager.getInstance()
@ -446,7 +445,7 @@ def webLogout(
request.session.flush()
request.authorized = False
response = HttpResponseRedirect(request.build_absolute_uri(exit_url))
response = HttpResponseRedirect(exit_url)
if authenticator:
authenticator.webLogoutHook(username, request, response)
return response