mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 09:06:40 +03:00
Pass request in the context when initializing LoginSerializer
This commit is contained in:
parent
606858fba7
commit
98306a35c1
|
@ -88,7 +88,7 @@ class LoginView(GenericAPIView):
|
|||
|
||||
def post(self, request, *args, **kwargs):
|
||||
self.request = request
|
||||
self.serializer = self.get_serializer(data=self.request.data)
|
||||
self.serializer = self.get_serializer(data=self.request.data, context={'request': request})
|
||||
self.serializer.is_valid(raise_exception=True)
|
||||
|
||||
self.login()
|
||||
|
|
Loading…
Reference in New Issue
Block a user