fix(core): fix excess run for pinned trigger in partial execution (#4185)

* 🐛 Fix excess run in partial execution

*  Undo changes to `workflowRun.ts`

*  Add to `startNodes` only if no `runData`
This commit is contained in:
Iván Ovejero
2022-10-04 10:35:22 +02:00
committed by GitHub
parent 1067ec0f5b
commit a751fd3ce7

View File

@@ -2,7 +2,7 @@
/* eslint-disable import/no-cycle */
import express from 'express';
import { IDataObject, IPinData, LoggerProxy, Workflow } from 'n8n-workflow';
import { IDataObject, INode, IPinData, LoggerProxy, Workflow } from 'n8n-workflow';
import axios from 'axios';
import { FindManyOptions, In } from 'typeorm';
@@ -565,7 +565,9 @@ workflowsController.post(
userId: req.user.id,
};
if (pinnedTrigger) {
const hasRunData = (node: INode) => runData !== undefined && !!runData[node.name];
if (pinnedTrigger && !hasRunData(pinnedTrigger)) {
data.startNodes = [pinnedTrigger.name];
}