Skip to content

Commit 5afed21

Browse files
Merge pull request #119 from fleischie/master
Bypass AssertionErrors on nested Hyperlinked fields
2 parents 77db2d8 + f1858e4 commit 5afed21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest_auth/registration/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def post(self, request, *args, **kwargs):
6262

6363
def get_response(self):
6464
# serializer = self.user_serializer_class(instance=self.user)
65-
serializer = self.serializer_class(instance=self.token)
65+
serializer = self.serializer_class(instance=self.token,
66+
context={'request': self.request})
6667
return Response(serializer.data, status=status.HTTP_201_CREATED)
6768

6869
def get_response_with_errors(self):

0 commit comments

Comments
 (0)