mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 17:16:34 +03:00
Bypass AssertionErrors on nested Hyperlinked fields
Send request as context data to the UserDetailSerializer class, when signing up. This way nested Hyperlinked serializer fields can be correctly resolved.
This commit is contained in:
parent
ba5edbaf62
commit
f1858e4ce4
|
@ -62,7 +62,8 @@ class RegisterView(APIView, SignupView):
|
||||||
|
|
||||||
def get_response(self):
|
def get_response(self):
|
||||||
# serializer = self.user_serializer_class(instance=self.user)
|
# serializer = self.user_serializer_class(instance=self.user)
|
||||||
serializer = self.serializer_class(instance=self.token)
|
serializer = self.serializer_class(instance=self.token,
|
||||||
|
context={'request': self.request})
|
||||||
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
||||||
|
|
||||||
def get_response_with_errors(self):
|
def get_response_with_errors(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user