Apply Tomate's suggestion: not x → x is not None

This commit is contained in:
Martin Pépin 2021-10-03 17:34:25 +02:00
parent acea5a6f4e
commit 7809a3c639
No known key found for this signature in database
GPG key ID: E7520278B1774448

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 next_page and 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, "", "", "")