bugfix: fix incorrect method call in LoginView, change from _create_token_response to create_token_response
This commit is contained in:
parent
f42ff47390
commit
81d1334013
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ class LoginView(APIView):
|
||||||
if user:
|
if user:
|
||||||
if not user.is_active:
|
if not user.is_active:
|
||||||
return Response({'error': 'Account is inactive, please check your mails'}, status=status.HTTP_403_FORBIDDEN)
|
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({'error': 'Unable to login with provided credentials.'}, status=status.HTTP_401_UNAUTHORIZED)
|
||||||
|
|
||||||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue