fix(core): Fix disabled parent output in partial execution (#3946)

🐛 Skip disabled parent in partial execution
This commit is contained in:
Iván Ovejero 2022-09-01 15:43:48 +02:00 committed by GitHub
parent 936cb11789
commit c8743ff6ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -192,6 +192,9 @@ export class WorkflowExecute {
for (const connections of incomingNodeConnections.main) {
for (let inputIndex = 0; inputIndex < connections.length; inputIndex++) {
connection = connections[inputIndex];
if (workflow.getNode(connection.node)?.disabled) continue;
incomingData.push(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
runData[connection.node][runIndex].data![connection.type][connection.index]!,
@ -257,7 +260,10 @@ export class WorkflowExecute {
// Only run the parent nodes and no others
let runNodeFilter: string[] | undefined;
// eslint-disable-next-line prefer-const
runNodeFilter = workflow.getParentNodes(destinationNode);
runNodeFilter = workflow
.getParentNodes(destinationNode)
.filter((parentNodeName) => !workflow.getNode(parentNodeName)?.disabled);
runNodeFilter.push(destinationNode);
this.runExecutionData = {

View file

@ -151,7 +151,9 @@ export const workflowRun = mixins(
// node for each of the branches
const parentNodes = workflow.getParentNodes(directParentNode, 'main');
// Add also the direct parent to be checked
// Add also the enabled direct parent to be checked
if (workflow.nodes[directParentNode].disabled) continue;
parentNodes.push(directParentNode);
for (const parentNode of parentNodes) {