From b8e06d245f5b8bc969d2eb29793e9d98a33e69a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Fri, 1 Sep 2023 09:32:39 +0200 Subject: [PATCH] fix: Ensure all new executions are saved (#7061) --- packages/editor-ui/src/mixins/workflowRun.ts | 4 +--- packages/editor-ui/src/stores/workflows.store.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/editor-ui/src/mixins/workflowRun.ts b/packages/editor-ui/src/mixins/workflowRun.ts index 170f2ed0c5..23e235e5fe 100644 --- a/packages/editor-ui/src/mixins/workflowRun.ts +++ b/packages/editor-ui/src/mixins/workflowRun.ts @@ -185,9 +185,7 @@ export const workflowRun = defineComponent({ startNodes.push(nodeName); } - const isNewWorkflow = this.workflowsStore.isNewWorkflow; - const hasWebhookNode = this.workflowsStore.currentWorkflowHasWebhookNode; - if (isNewWorkflow && hasWebhookNode) { + if (this.workflowsStore.isNewWorkflow) { await this.saveCurrentWorkflow(); } diff --git a/packages/editor-ui/src/stores/workflows.store.ts b/packages/editor-ui/src/stores/workflows.store.ts index 811535ace0..ae35bf88c5 100644 --- a/packages/editor-ui/src/stores/workflows.store.ts +++ b/packages/editor-ui/src/stores/workflows.store.ts @@ -164,7 +164,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, { }); }, currentWorkflowHasWebhookNode(): boolean { - return !!this.workflow.nodes.find((node: INodeUi) => !!node.webhookId); + return !!this.workflow.nodes.find((node: INodeUi) => !!node.webhookId); // includes Wait node }, getWorkflowRunData(): IRunData | null { if (!this.workflowExecutionData?.data?.resultData) {