Project

Profile

Help

Story #5539

closed

general_create cannot report on the creation of multiple models if the serializer creates them

Added by bmbouter over 4 years ago. Updated over 3 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

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.

Actions #1

Updated by bmbouter over 4 years ago

  • Description updated (diff)
Actions #2

Updated by fao89 over 4 years ago

  • Tracker changed from Issue to Story
  • % Done set to 0
Actions #3

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.

Also available in: Atom PDF