          for field_name, relation_info in info.relations.items():
              if relation_info.to_many and (field_name in attrs):
                  many_to_many[field_name] = attrs.pop(field_name)
  
          instance = ModelClass.objects.create(**attrs)
  
          # Save many-to-many relationships after the instance is created.
          if many_to_many:
              for field_name, value in many_to_many.items():
                  setattr(instance, field_name, value)
 
</s> remove             if relation_info.to_many and (field_name in attrs):
                many_to_many[field_name] = attrs.pop(field_name)
 </s> add             if relation_info.to_many and (field_name in validated_attrs):
                many_to_many[field_name] = validated_attrs.pop(field_name) </s> remove         # Remove many-to-many relationships from attrs.
 </s> add         # Remove many-to-many relationships from validated_attrs. </s> remove     def create(self, attrs):
 </s> add     def create(self, validated_attrs): </s> remove If you do need custom behavior, you might choose to instead override the `.save()` method on your serializer class. For example:
 </s> add These method should save the object instance by calling `serializer.save()`, adding in any explicit additional arguments as required. They may also perform any custom pre-save or post-save behavior.
        instance = ModelClass.objects.create(**validated_attrs)
          for field_name, relation_info in info.relations.items():
              if relation_info.to_many and (field_name in attrs):
                  many_to_many[field_name] = attrs.pop(field_name)
  
        instance = ModelClass.objects.create(**validated_attrs)
  
          # Save many-to-many relationships after the instance is created.
          if many_to_many:
              for field_name, value in many_to_many.items():
                  setattr(instance, field_name, value)
keep keep keep keep replace keep keep keep keep keep
 Tweak pre/post save hooks. Return instance in .update(). 
rest_framework/serializers.py