mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Remove run data of utility nodes for partial executions v2 (#12673)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { INode, IRunData } from 'n8n-workflow';
|
||||
import { NodeConnectionType, type INode, type IRunData } from 'n8n-workflow';
|
||||
|
||||
import type { DirectedGraph } from './directed-graph';
|
||||
|
||||
@@ -16,10 +16,22 @@ export function cleanRunData(
|
||||
|
||||
for (const startNode of startNodes) {
|
||||
delete newRunData[startNode.name];
|
||||
const children = graph.getChildren(startNode);
|
||||
|
||||
for (const child of children) {
|
||||
delete newRunData[child.name];
|
||||
const children = graph.getChildren(startNode);
|
||||
for (const node of [startNode, ...children]) {
|
||||
delete newRunData[node.name];
|
||||
|
||||
// Delete runData for subNodes
|
||||
const subNodeConnections = graph.getParentConnections(node);
|
||||
for (const subNodeConnection of subNodeConnections) {
|
||||
// Sub nodes never use the Main connection type, so this filters our
|
||||
// the connection that goes upstream of the startNode.
|
||||
if (subNodeConnection.type === NodeConnectionType.Main) {
|
||||
continue;
|
||||
}
|
||||
|
||||
delete newRunData[subNodeConnection.from.name];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user