From b170fb0cf3b23a70085bbfa5240f6c262c80c890 Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Tue, 2 Nov 2021 13:43:58 +0100 Subject: [PATCH] TMSS-1124: create a subtask_output per task_connector_type of the task, but only with role Correlator or Beamformer because that is what observations produce --- SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py b/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py index 950c332483a..32d00e9ed57 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py @@ -644,8 +644,8 @@ def create_observation_control_subtask_from_task_blueprint(task_blueprint: TaskB # step 2: create and link subtask input/output # an observation has no input, it just produces output data - # create a subtask_output per task_connector_type of the task - for task_connector_type in task_blueprint.specifications_template.connector_types.filter(iotype__value=IOType.Choices.OUTPUT.value).all(): + # create a subtask_output per task_connector_type of the task, but only with role Correlator or Beamformer because that is what observations produce. + for task_connector_type in task_blueprint.specifications_template.connector_types.filter(iotype__value=IOType.Choices.OUTPUT.value).filter(Q(role__value=Role.Choices.CORRELATOR.value)|Q(role__value=Role.Choices.BEAMFORMER.value)).all(): subtask_output = SubtaskOutput.objects.create(subtask=subtask, output_role=task_connector_type) # step 3: set state to DEFINED -- GitLab