diff --git a/konova/views/logout.py b/konova/views/logout.py index 57a34fd6..abeb9b3e 100644 --- a/konova/views/logout.py +++ b/konova/views/logout.py @@ -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)