Story #5539
closedgeneral_create cannot report on the creation of multiple models if the serializer creates them
0%
Description
Problem¶
Say a single Artifact will generate multiple Content units, and the plugin writer is using SingleArtifactContentUploadViewSet which will use general_create
The serializer will create multiple content objects successfull, but at this line
Solution¶
Option 1:
Update general_create() to handle both the single created resource and the multi-created resource cases.
Option 2:
Move the CreatedResource part out of general_create() and into a Serializer and have general_create call it. Perhaps it would be called save_created_resources
. This would allow a default implementation to handle the single case, and multi-resource workflows would override their serializers to create more CreateResource objects then
Option 3:
Have the CreateResource records created in the Serializer.create() itself. This is a variation of Option 2, only with without a separate interface.
Updated by fao89 over 4 years ago
- Tracker changed from Issue to Story
- % Done set to 0
Updated by dkliban@redhat.com over 3 years ago
- Status changed from NEW to CLOSED - WONTFIX
Please re-open when a plugin has a use case for this feature.