1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-09-19 08:57:09 +03:00

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,
);