Skip to content

Commit

Permalink
Fixed failing cases
Browse files Browse the repository at this point in the history
  • Loading branch information
UmeshanUC authored Mar 17, 2024
1 parent a47d3c8 commit feabde6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dj_rest_auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def post(self, request, *args, **kwargs):
return self.logout(request)

def logout(self, request):
if not request.auth:
if not (request.auth or api_settings.USE_JWT or api_settings.SESSION_LOGIN):
return Response(
{'detail': _('You should be logged in to logout. Check whether the token is passed.')},
status=status.HTTP_400_BAD_REQUEST,
Expand Down

0 comments on commit feabde6

Please sign in to comment.