fix(core): Fix manual execution of pinned trigger on main mode (#4535)

🐛 Fix manual execution of pinned trigger on main mode
This commit is contained in:
Iván Ovejero 2022-11-08 09:40:05 +01:00 committed by GitHub
parent c239eea1b9
commit 5d73b6e48a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -318,11 +318,19 @@ export class WorkflowRunner {
Logger.debug(`Execution ID ${executionId} will run executing all nodes.`, { executionId });
// Execute all nodes
let startNode;
if (
data.startNodes?.length === 1 &&
Object.keys(data.pinData ?? {}).includes(data.startNodes[0])
) {
startNode = workflow.getNode(data.startNodes[0]) ?? undefined;
}
// Can execute without webhook so go on
const workflowExecute = new WorkflowExecute(additionalData, data.executionMode);
workflowExecution = workflowExecute.run(
workflow,
undefined,
startNode,
data.destinationNode,
data.pinData,
);