From 7d03676ac214fc29913a1eed88c7eea1463a7a3a Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 11 Feb 2025 14:11:12 +0100 Subject: [PATCH] workflow scheduler create booking with a booking execution lot id --- models/workflow_execution/workflow_scheduler.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/models/workflow_execution/workflow_scheduler.go b/models/workflow_execution/workflow_scheduler.go index bd22437..7889a44 100644 --- a/models/workflow_execution/workflow_scheduler.go +++ b/models/workflow_execution/workflow_scheduler.go @@ -111,13 +111,11 @@ func (ws *WorkflowSchedule) Schedules(wfID string, request *tools.APIRequest) (* return ws, nil, []*WorkflowExecution{}, errors.New("no path found") } ok, wf, executions, err := ws.CheckBooking(wfID, request) - if !ok || err != nil { - return ws, nil, []*WorkflowExecution{}, errors.New("could not book the workflow : " + fmt.Sprintf("%v", err)) - } - - ws.Workflow = wf ws.WorkflowExecution = executions - + if !ok || err != nil { + return ws, nil, executions, errors.New("could not book the workflow : " + fmt.Sprintf("%v", err)) + } + ws.Workflow = wf for _, exec := range executions { err := exec.PurgeDraft(request) if err != nil {