fix: Ensure all new executions are saved (#7061)

This commit is contained in:
Iván Ovejero 2023-09-01 09:32:39 +02:00 committed by GitHub
parent 8a8d4e8bb3
commit b8e06d245f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -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();
}

View file

@ -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) {