Merge pull request 'master' (#459) from master into Docker

Reviewed-on: #459
This commit is contained in:
mpeltriaux 2024-12-23 13:42:36 +01:00
commit 335800c44b

View File

@ -25,9 +25,12 @@ class LogoutView(View):
A redirect
"""
user = request.user
oauth_token = user.oauth_token
if oauth_token:
oauth_token.revoke()
try:
oauth_token = user.oauth_token
if oauth_token:
oauth_token.revoke()
except AttributeError:
pass
logout(request)
return redirect(SSO_SERVER_BASE)