fix(n8n Evaluation Trigger Node): Fix tweaks (#15473)

This commit is contained in:
Dana
2025-05-19 11:33:07 +02:00
committed by GitHub
parent 5c3840583d
commit 3985387204
7 changed files with 51 additions and 14 deletions

View File

@@ -25,7 +25,7 @@ export async function setOutput(this: IExecuteFunctions): Promise<INodeExecution
message: "No outputs were set since the execution didn't start from an evaluation trigger",
location: 'outputPane',
});
return [];
return [this.getInputData()];
}
const outputFields = this.getNodeParameter('outputs.values', 0, []) as Array<{
@@ -107,12 +107,6 @@ export async function setMetrics(this: IExecuteFunctions): Promise<INodeExecutio
const assignmentValue =
typeof assignment.value === 'number' ? assignment.value : Number(assignment.value);
if (!assignment.name || isNaN(assignmentValue)) {
throw new NodeOperationError(this.getNode(), 'Metric name missing', {
description: 'Make sure each metric you define has a name',
});
}
if (isNaN(assignmentValue)) {
throw new NodeOperationError(
this.getNode(),
@@ -123,6 +117,12 @@ export async function setMetrics(this: IExecuteFunctions): Promise<INodeExecutio
);
}
if (!assignment.name || isNaN(assignmentValue)) {
throw new NodeOperationError(this.getNode(), 'Metric name missing', {
description: 'Make sure each metric you define has a name',
});
}
const { name, value } = validateEntry(
assignment.name,
assignment.type as FieldType,