# Hotfix
* fixes bug where anonymous user trying to logout would throw error
This commit is contained in:
parent
72a5075f3b
commit
7b5c1f0d97
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user