                              setattr(related_item, fk_field, obj)
                              self.save_object(related_item)
                      else:
                          # Nested reverse one-one relationship
                          fk_field = obj._meta.get_field_by_name(accessor_name)[0].field.name
                          setattr(related, fk_field, obj)
                          self.save_object(related)
                  else:
 
</s> remove                         self._deleted = identity_to_objects.values()
 </s> add                         ret._deleted = identity_to_objects.values() </s> remove         if self.allow_add_remove and self._deleted:
            [self.delete_object(item) for item in self._deleted]
 </s> add             if self.allow_add_remove and self.object._deleted:
                [self.delete_object(item) for item in self.object._deleted]
        else:
            self.save_object(self.object, **kwargs)         </s> remove         else:
            self.save_object(self.object, **kwargs)
 </s> add  </s> remove         removed_relations = []
 </s> add  </s> remove         instance._removed_relations = removed_relations
 </s> add 
                        # Delete any removed objects
                        if field.allow_add_remove and related._deleted:
                            [self.delete_object(item) for item in related._deleted]

                              setattr(related_item, fk_field, obj)
                              self.save_object(related_item)
                        # Delete any removed objects
                        if field.allow_add_remove and related._deleted:
                            [self.delete_object(item) for item in related._deleted]

                      else:
                          # Nested reverse one-one relationship
                          fk_field = obj._meta.get_field_by_name(accessor_name)[0].field.name
                          setattr(related, fk_field, obj)
                          self.save_object(related)
                  else:
keep add keep keep keep keep keep keep
 Fix model serializer nestesd delete behavior 
rest_framework/serializers.py