mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
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:
parent
1067ec0f5b
commit
a751fd3ce7
|
@ -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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue