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:
@@ -2,7 +2,7 @@
|
|||||||
/* eslint-disable import/no-cycle */
|
/* eslint-disable import/no-cycle */
|
||||||
|
|
||||||
import express from 'express';
|
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 axios from 'axios';
|
||||||
import { FindManyOptions, In } from 'typeorm';
|
import { FindManyOptions, In } from 'typeorm';
|
||||||
@@ -565,7 +565,9 @@ workflowsController.post(
|
|||||||
userId: req.user.id,
|
userId: req.user.id,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (pinnedTrigger) {
|
const hasRunData = (node: INode) => runData !== undefined && !!runData[node.name];
|
||||||
|
|
||||||
|
if (pinnedTrigger && !hasRunData(pinnedTrigger)) {
|
||||||
data.startNodes = [pinnedTrigger.name];
|
data.startNodes = [pinnedTrigger.name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user