              if self.required:
                  raise ValidationError(self.error_messages['required'])
              return
  
          if self.parent.object:
              # Set the serializer object if it exists
              obj = getattr(self.parent.object, field_name)
              self.object = obj
  
          if value in (None, ''):
              into[(self.source or field_name)] = None
          else:
              kwargs = {
 
</s> remove             into[(self.source or field_name)] = None
 </s> add             if isinstance(self, ModelSerializer):
                self._delete = True
                self.object = obj
                into[(self.source or field_name)] = self
            else:
                into[(self.source or field_name)] = None </s> remove                 self.object = serializer.object
                into[self.source or field_name] = serializer.object
 </s> add                 if isinstance(serializer, ModelSerializer):
                    into[self.source or field_name] = serializer
                else:
                    into[self.source or field_name] = serializer.object </s> remove     def save_object(self, obj):
 </s> add     def save_object(self, obj, parent=None, fk_field=None): </s> remove                 setattr(self.object, accessor_name, object_list)
 </s> add                 if isinstance(object_list, ModelSerializer):
                    fk_field = self.object._meta.get_field_by_name(accessor_name)[0].field.name
                    object_list.save_object(object_list.object, parent=self.object, fk_field=fk_field)
                else:
                    setattr(self.object, accessor_name, object_list)
        # Set the serializer object if it exists
        obj = getattr(self.parent.object, field_name) if self.parent.object else None
              if self.required:
                  raise ValidationError(self.error_messages['required'])
              return
  
        # Set the serializer object if it exists
        obj = getattr(self.parent.object, field_name) if self.parent.object else None
        # Set the serializer object if it exists
        obj = getattr(self.parent.object, field_name) if self.parent.object else None
        # Set the serializer object if it exists
        obj = getattr(self.parent.object, field_name) if self.parent.object else None
        # Set the serializer object if it exists
        obj = getattr(self.parent.object, field_name) if self.parent.object else None
  
          if value in (None, ''):
              into[(self.source or field_name)] = None
          else:
              kwargs = {
keep keep keep keep replace replace replace replace keep keep keep keep keep
 One-to-one writable, nested serializer support 
rest_framework/serializers.py