fix: Prevent removing manual executions when setting says to save (#6300)

This commit is contained in:
Omar Ajoue 2023-05-23 13:00:26 +02:00 committed by GitHub
parent d5c7e6f2cf
commit 55b755cb44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(