From 81d133401319a9c667578bcd6f5ece85224c78ce Mon Sep 17 00:00:00 2001 From: Chneemann Date: Sun, 6 Apr 2025 11:03:24 +0200 Subject: [PATCH] bugfix: fix incorrect method call in LoginView, change from _create_token_response to create_token_response --- auth_app/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth_app/views.py b/auth_app/views.py index b50ce03..be3e12a 100644 --- a/auth_app/views.py +++ b/auth_app/views.py @@ -42,7 +42,7 @@ class LoginView(APIView): if user: if not user.is_active: return Response({'error': 'Account is inactive, please check your mails'}, status=status.HTTP_403_FORBIDDEN) - return self.create_token_response(user) + return self._create_token_response(user) return Response({'error': 'Unable to login with provided credentials.'}, status=status.HTTP_401_UNAUTHORIZED) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)