##// END OF EJS Templates
auth-token: only delete token if it exists.
marcink -
r1839:b52a5a91 default
parent child Browse files
Show More
@@ -71,6 +71,8 b' class AuthTokenModel(BaseModel):'
71 user = self._get_user(user)
71 user = self._get_user(user)
72 auth_token = auth_token.filter(UserApiKeys.user_id == user.user_id)
72 auth_token = auth_token.filter(UserApiKeys.user_id == user.user_id)
73 auth_token = auth_token.scalar()
73 auth_token = auth_token.scalar()
74
75 if auth_token:
74 try:
76 try:
75 Session().delete(auth_token)
77 Session().delete(auth_token)
76 except Exception:
78 except Exception:
General Comments 0
You need to be logged in to leave comments. Login now