diff --git a/packages/cli/src/WorkflowExecuteAdditionalData.ts b/packages/cli/src/WorkflowExecuteAdditionalData.ts index a7b201027d..8565aff6b3 100644 --- a/packages/cli/src/WorkflowExecuteAdditionalData.ts +++ b/packages/cli/src/WorkflowExecuteAdditionalData.ts @@ -158,7 +158,7 @@ const hooks = (mode: WorkflowExecuteMode, workflowData: IWorkflowBase, execution workflowExecuteAfter: [ async (fullRunData: IRun, newStaticData: IDataObject): Promise => { try { - if (mode !== 'manual' && WorkflowHelpers.isWorkflowIdValid(workflowData.id as string) === true) { + if (mode !== 'manual' && WorkflowHelpers.isWorkflowIdValid(workflowData.id as string) === true && newStaticData) { // Workflow is saved so update in database try { await WorkflowHelpers.saveStaticDataById(workflowData.id as string, newStaticData);