Merge branch 'kerl/issue20' into 'master'

Handle LOGOUT_URL=None in the logout view

Closes #20

See merge request klub-dev-ens/authens!34
This commit is contained in:
Tom Hubrecht 2021-10-03 17:50:10 +02:00
commit 22b4d440c3

View file

@ -145,7 +145,7 @@ class LogoutView(auth_views.LogoutView):
# If the next_url is local (no hostname), make it absolute so that the user # If the next_url is local (no hostname), make it absolute so that the user
# is correctly redirected from CAS. # is correctly redirected from CAS.
if not urlparse(next_page).netloc: if next_page is not None and not urlparse(next_page).netloc:
request = self.request request = self.request
next_page = urlunparse( next_page = urlunparse(
(request.scheme, request.get_host(), next_page, "", "", "") (request.scheme, request.get_host(), next_page, "", "", "")