From 55b755cb44a3bf9fc9d41af37b7818d3626baf0d Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Tue, 23 May 2023 13:00:26 +0200 Subject: [PATCH] fix: Prevent removing manual executions when setting says to save (#6300) --- .../cli/src/WorkflowExecuteAdditionalData.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/cli/src/WorkflowExecuteAdditionalData.ts b/packages/cli/src/WorkflowExecuteAdditionalData.ts index f19278700b..cdfd6cb657 100644 --- a/packages/cli/src/WorkflowExecuteAdditionalData.ts +++ b/packages/cli/src/WorkflowExecuteAdditionalData.ts @@ -610,16 +610,14 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks { (workflowDidSucceed && saveDataSuccessExecution === 'none') || (!workflowDidSucceed && saveDataErrorExecution === 'none') ) { - if (!fullRunData.waitTill) { - if (!isManualMode) { - executeErrorWorkflow( - this.workflowData, - fullRunData, - this.mode, - this.executionId, - this.retryOf, - ); - } + if (!fullRunData.waitTill && !isManualMode) { + executeErrorWorkflow( + this.workflowData, + fullRunData, + this.mode, + this.executionId, + this.retryOf, + ); // Data is always saved, so we remove from database await Db.collections.Execution.delete(this.executionId); await BinaryDataManager.getInstance().markDataForDeletionByExecutionId(