mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-09 08:00:52 +03:00
Fix incorrect bit of tutorial
This commit is contained in:
parent
d68684e26e
commit
921c5840aa
|
@ -53,7 +53,7 @@ So far, so good. It looks pretty similar to the previous case, but we've got be
|
||||||
comment = self.get_object(pk)
|
comment = self.get_object(pk)
|
||||||
serializer = CommentSerializer(request.DATA, instance=comment)
|
serializer = CommentSerializer(request.DATA, instance=comment)
|
||||||
if serializer.is_valid():
|
if serializer.is_valid():
|
||||||
comment = serializer.deserialized
|
comment = serializer.object
|
||||||
comment.save()
|
comment.save()
|
||||||
return Response(serializer.data)
|
return Response(serializer.data)
|
||||||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user