Skip to content
Snippets Groups Projects
Commit 949287cb authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-1124: copy draft properties to blueprint

parent 69541e98
No related branches found
No related tags found
1 merge request!633TMSS-1124
......@@ -72,7 +72,11 @@ def create_scheduling_unit_blueprint_from_scheduling_unit_draft(scheduling_unit_
name=scheduling_unit_draft.name,
description=scheduling_unit_draft.description,
draft=scheduling_unit_draft,
specifications_template=scheduling_unit_draft.specifications_template)
specifications_template=scheduling_unit_draft.specifications_template,
ingest_permission_required=scheduling_unit_draft.ingest_permission_required,
piggyback_allowed_tbb=scheduling_unit_draft.piggyback_allowed_tbb,
piggyback_allowed_aartfaac=scheduling_unit_draft.piggyback_allowed_aartfaac,
interrupts_telescope=scheduling_unit_draft.interrupts_telescope)
logger.info("create_scheduling_unit_blueprint_from_scheduling_unit_draft(scheduling_unit_draft.id=%s name='%s') created scheduling_unit_blueprint id=%s name='%s'",
scheduling_unit_draft.pk, scheduling_unit_draft.name, scheduling_unit_blueprint.pk, scheduling_unit_blueprint.name)
......@@ -421,8 +425,9 @@ def create_task_blueprint_from_task_draft(task_draft: models.TaskDraft) -> model
def create_scheduling_unit_blueprint_and_tasks_and_subtasks_from_scheduling_unit_draft(scheduling_unit_draft: models.SchedulingUnitDraft) -> models.SchedulingUnitBlueprint:
'''Convenience method: Create the scheduling_unit_blueprint, then create its child task_blueprint(s), then create the task_blueprint's subtasks'''
scheduling_unit_blueprint = create_scheduling_unit_blueprint_from_scheduling_unit_draft(scheduling_unit_draft)
return update_task_blueprints_and_subtasks_graph_from_draft(scheduling_unit_blueprint)
with transaction.atomic():
scheduling_unit_blueprint = create_scheduling_unit_blueprint_from_scheduling_unit_draft(scheduling_unit_draft)
return update_task_blueprints_and_subtasks_graph_from_draft(scheduling_unit_blueprint)
def create_task_blueprint_and_subtasks_from_task_draft(task_draft: models.TaskDraft) -> models.TaskBlueprint:
......
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