Skip to content
Snippets Groups Projects
Commit 45c5fe9d authored by Fabio Vitello's avatar Fabio Vitello
Browse files

TMSS-234: Use copy_task_blueprint_to_task_draft to copy task BP to Draft

In create_scheduling_unit_draft_from_scheduling_unit_blueprint is now used copy_task_blueprint_to_task_draft to copy the task drafts
parent f1594dd8
No related branches found
No related tags found
1 merge request!181Resolve TMSS-234
......@@ -81,7 +81,7 @@ def create_scheduling_unit_draft_from_scheduling_unit_blueprint(scheduling_unit_
task_blueprints = list(scheduling_unit_blueprint.task_blueprints.all())
for tb in task_blueprints:
task_drafts_copy.append(copy_task_draft(tb.draft))
task_drafts_copy.append(copy_task_blueprint_to_task_draft(tb))
scheduling_unit_draft.task_drafts.set(task_drafts_copy)
scheduling_unit_draft.save()
......
......@@ -142,10 +142,10 @@ router.register(r'task_blueprint/(?P<task_blueprint_id>\d+)/subtask', viewsets.S
# copy
router.register(r'task_draft/(?P<task_draft_id>\d+)/copy', viewsets.TaskDraftCopyViewSet)
router.register(r'task_blueprint/(?P<task_blueprint_id>\d+)/copy_to_task_draft', viewsets.TaskBlueprintCopyToTaskDraftViewSet)
router.register(r'scheduling_set/(?P<scheduling_set_id>\d+)/copy_scheduling_unit_drafts', viewsets.SchedulingUnitDraftCopyFromSchedulingSetViewSet)
router.register(r'scheduling_unit_draft/(?P<scheduling_unit_draft_id>\d+)/copy', viewsets.SchedulingUnitDraftCopyViewSet)
router.register(r'scheduling_unit_blueprint/(?P<scheduling_unit_blueprint_id>\d+)/copy_to_scheduling_unit_draft', viewsets.SchedulingUnitBlueprintCopyToSchedulingUnitDraftViewSet)
router.register(r'task_blueprint/(?P<task_blueprint_id>\d+)/copy_to_task_draft', viewsets.TaskBlueprintCopyToTaskDraftViewSet)
# SCHEDULING
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment