diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py b/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py index 1b03d5ff8f4a39639eefabe4ff1c9b6b6168f33d..7618b07aac8dc4dbd1db599da46322cce36601c7 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py @@ -1050,19 +1050,6 @@ class TaskDraftViewSet(LOFARViewSet): return Response(serializers.TaskBlueprintSerializer(task_blueprint, context={'request':request}).data, status=status.HTTP_201_CREATED) - @swagger_auto_schema(responses={201: "This TaskBlueprint, with its created (and some scheduled) subtasks", - 403: 'forbidden'}, - operation_description="Create subtasks, and schedule the ones that are not dependend on predecessors.") - @action(methods=['post'], detail=True, url_name="create_task_blueprint_subtasks_and_schedule", name="Create TaskBlueprint, its Subtask(s) and Schedule") - def create_task_blueprint_subtasks_and_schedule(self, request, pk=None): - task_draft = get_object_or_404(models.TaskDraft, pk=pk) - task_blueprint = create_task_blueprint_and_subtasks_and_schedule_subtasks_from_task_draft(task_draft) - - # return a response with the new serialized TaskBlueprint - return Response(serializers.TaskBlueprintSerializer(task_blueprint, context={'request':request}).data, - status=status.HTTP_201_CREATED) - - @swagger_auto_schema(responses={201: "This TaskBlueprint, with its created subtask(s)", 403: 'forbidden'}, operation_description="Create subtasks.") @@ -1215,19 +1202,6 @@ class TaskBlueprintViewSet(LOFARViewSet): return Response(serializers.TaskBlueprintSerializer(task_blueprint, context={'request':request}).data, status=status.HTTP_201_CREATED) - @swagger_auto_schema(responses={201: "This TaskBlueprint, with it's created (and some scheduled) subtasks", - 403: 'forbidden'}, - operation_description="Create subtasks, and schedule the ones that are not dependend on predecessors.") - @action(methods=['post'], detail=True, url_name="create_subtasks_and_schedule", name="Create Subtasks and Schedule") - def create_subtasks_and_schedule(self, request, pk=None): - task_blueprint = get_object_or_404(models.TaskBlueprint, pk=pk) - subtasks = create_and_schedule_subtasks_from_task_blueprint(task_blueprint) - task_blueprint.refresh_from_db() - - # return a response with the new serialized task_blueprint (with references to the created (and scheduled) subtasks) - return Response(serializers.TaskBlueprintSerializer(task_blueprint, context={'request':request}).data, - status=status.HTTP_201_CREATED) - @swagger_auto_schema(responses={201: "This TaskBlueprint, with the scheduled subtasks", 403: 'forbidden'}, operation_description="Schedule the Subtasks that are not dependend on predecessors.")