Commit 921c5840 by Tom Christie

Fix incorrect bit of tutorial

parent d68684e2
...@@ -53,7 +53,7 @@ So far, so good. It looks pretty similar to the previous case, but we've got be ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment