mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Missing pairedItem fixes (#8394)
This commit is contained in:
@@ -7,6 +7,7 @@ import type {
|
||||
IHookFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
INodeExecutionData,
|
||||
IPairedItemData,
|
||||
IPollFunctions,
|
||||
} from 'n8n-workflow';
|
||||
import { jsonParse, NodeOperationError } from 'n8n-workflow';
|
||||
@@ -106,11 +107,15 @@ export async function downloadRecordAttachments(
|
||||
this: IExecuteFunctions | IPollFunctions,
|
||||
records: IDataObject[],
|
||||
fieldNames: string[],
|
||||
pairedItem?: IPairedItemData[],
|
||||
): Promise<INodeExecutionData[]> {
|
||||
const elements: INodeExecutionData[] = [];
|
||||
|
||||
for (const record of records) {
|
||||
const element: INodeExecutionData = { json: {}, binary: {} };
|
||||
if (pairedItem) {
|
||||
element.pairedItem = pairedItem;
|
||||
}
|
||||
element.json = record as unknown as IDataObject;
|
||||
for (const fieldName of fieldNames) {
|
||||
let attachments = record[fieldName] as IAttachment[];
|
||||
|
||||
Reference in New Issue
Block a user