Project

Profile

Help

Story #5539

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

Added by bmbouter 12 months ago. Updated 12 months ago.

Status:
NEW
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.

History

#1 Updated by bmbouter 12 months ago

  • Description updated (diff)

#2 Updated by fao89 12 months ago

  • Tracker changed from Issue to Story
  • % Done set to 0

Please register to edit this issue

Also available in: Atom PDF