Skip to content

Commit 2266723

Browse files
committed
passing on the context/request to serializer
1 parent 49ccfe9 commit 2266723

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rest_auth/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ def get_response(self):
6363
'user': self.user,
6464
'token': self.token
6565
}
66-
serializer = serializer_class(instance=data)
66+
serializer = serializer_class(instance=data, context={'request': self.request})
6767
else:
68-
serializer = serializer_class(instance=self.token)
68+
serializer = serializer_class(instance=self.token, context={'request': self.request})
6969

7070
return Response(serializer.data, status=status.HTTP_200_OK)
7171

0 commit comments

Comments
 (0)