Skip to content

Commit a4edae6

Browse files
committed
Fix tests
1 parent 126b660 commit a4edae6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drfpasswordless/views.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,8 @@ def post(self, request, *args, **kwargs):
146146
if token:
147147
TokenSerializer = import_string(api_settings.PASSWORDLESS_AUTH_TOKEN_SERIALIZER)
148148
token_serializer = TokenSerializer(token)
149-
if token_serializer.is_valid():
150-
# Return our key for consumption.
151-
return Response(token_serializer.validated_data, status=status.HTTP_200_OK)
149+
# Return our key for consumption.
150+
return Response(token_serializer.validated_data, status=status.HTTP_200_OK)
152151
else:
153152
logger.error("Couldn't log in unknown user. Errors on serializer: {}".format(serializer.error_messages))
154153
return Response({'detail': 'Couldn\'t log you in. Try again later.'}, status=status.HTTP_400_BAD_REQUEST)

0 commit comments

Comments
 (0)