      def save_object(self, obj, **kwargs):
          """
          Save the deserialized object and return it.
          """
          obj.save(**kwargs)
  
          if getattr(obj, '_m2m_data', None):
              for accessor_name, object_list in obj._m2m_data.items():
 
</s> remove                 if related is None:
                    previous = getattr(obj, accessor_name, related)
                    if previous:
                        previous.delete()
                elif isinstance(related, models.Model):
 </s> add                 field = self.fields.get(accessor_name, None)
                if isinstance(field, Serializer):
                    # TODO: Following will be needed for reverse FK
                    # if field.many:
                    #     # Nested reverse fk relationship
                    #     for related_item in related:
                    #         fk_field = obj._meta.get_field_by_name(accessor_name)[0].field.name
                    #         setattr(related_item, fk_field, obj)
                    #         self.save_object(related_item)
                    # else:
                    # Nested reverse one-one relationship </s> remove             if field_name in exclusions and not field.read_only:
 </s> add             if field_name in exclusions \
                and not field.read_only \
                and not isinstance(field, Serializer):
        if getattr(obj, '_nested_forward_relations', None):
            # Nested relationships need to be saved before we can save the
            # parent instance.
            for field_name, sub_object in obj._nested_forward_relations.items():
                self.save_object(sub_object)
                setattr(obj, field_name, sub_object)

      def save_object(self, obj, **kwargs):
          """
          Save the deserialized object and return it.
          """
        if getattr(obj, '_nested_forward_relations', None):
            # Nested relationships need to be saved before we can save the
            # parent instance.
            for field_name, sub_object in obj._nested_forward_relations.items():
                self.save_object(sub_object)
                setattr(obj, field_name, sub_object)

          obj.save(**kwargs)
  
          if getattr(obj, '_m2m_data', None):
              for accessor_name, object_list in obj._m2m_data.items():
keep keep keep add keep keep keep keep
 Cleanup one-one nested tests and implementation 
rest_framework/serializers.py