mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix: Manually reverted PR 11716 Do not assign all paired items (no-changelog) (#13429)
This commit is contained in:
@@ -2,6 +2,7 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n
|
||||
|
||||
import type { JsonToSpreadsheetBinaryFormat, JsonToSpreadsheetBinaryOptions } from '@utils/binary';
|
||||
import { convertJsonToSpreadsheetBinary } from '@utils/binary';
|
||||
import { generatePairedItemData } from '@utils/utilities';
|
||||
|
||||
import { toFileOptions, toFileProperties } from '../description';
|
||||
|
||||
@@ -10,6 +11,8 @@ export const description: INodeProperties[] = [...toFileProperties, toFileOption
|
||||
export async function execute(this: IExecuteFunctions, items: INodeExecutionData[]) {
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
|
||||
const pairedItem = generatePairedItemData(items.length);
|
||||
|
||||
try {
|
||||
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0);
|
||||
const fileFormat = this.getNodeParameter('fileFormat', 0) as JsonToSpreadsheetBinaryFormat;
|
||||
@@ -22,6 +25,7 @@ export async function execute(this: IExecuteFunctions, items: INodeExecutionData
|
||||
binary: {
|
||||
[binaryPropertyName]: binaryData,
|
||||
},
|
||||
pairedItem,
|
||||
};
|
||||
|
||||
returnData.push(newItem);
|
||||
@@ -31,6 +35,7 @@ export async function execute(this: IExecuteFunctions, items: INodeExecutionData
|
||||
json: {
|
||||
error: error.message,
|
||||
},
|
||||
pairedItem,
|
||||
});
|
||||
} else {
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user