Skip to content

Commit

Permalink
fix: Ensure all new executions are saved (#7061)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov authored Sep 1, 2023
1 parent 8a8d4e8 commit b8e06d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions packages/editor-ui/src/mixins/workflowRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/src/stores/workflows.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b8e06d2

Please sign in to comment.