no need to pass context to get_serializer

This commit is contained in:
Dhaval Mehta 2020-06-23 15:28:03 +05:30
parent ca355baf7a
commit 1b2073a187

View File

@ -105,8 +105,7 @@ class LoginView(GenericAPIView):
def post(self, request, *args, **kwargs):
self.request = request
self.serializer = self.get_serializer(data=self.request.data,
context=self.get_serializer_context())
self.serializer = self.get_serializer(data=self.request.data)
self.serializer.is_valid(raise_exception=True)
self.login()