dont delete auth token on logout

This commit is contained in:
Steve Recio 2020-02-10 13:02:20 -05:00
parent 596cbee153
commit 10eb4be9cd

View File

@ -129,10 +129,6 @@ class LogoutView(APIView):
return self.logout(request) return self.logout(request)
def logout(self, request): def logout(self, request):
try:
request.user.auth_token.delete()
except (AttributeError, ObjectDoesNotExist):
pass
if getattr(settings, 'REST_SESSION_LOGIN', True): if getattr(settings, 'REST_SESSION_LOGIN', True):
django_logout(request) django_logout(request)