diff --git a/packages/server/src/api/controllers/table/utils.ts b/packages/server/src/api/controllers/table/utils.ts index 7c5c81939a..3de4f856f6 100644 --- a/packages/server/src/api/controllers/table/utils.ts +++ b/packages/server/src/api/controllers/table/utils.ts @@ -99,16 +99,17 @@ export function makeSureTableUpToDate(table: any, tableToSave: any) { return tableToSave } -export function importToRows(data: any, table: any, user: any = {}) { +export function importToRows(data: any, table: Table, user: any = {}) { let finalData: any = [] for (let i = 0; i < data.length; i++) { let row = data[i] - row._id = generateRowID(table._id) + row._id = generateRowID(table._id!) row.tableId = table._id - const processed: any = inputProcessing(user, table, row, { + const processed = inputProcessing(user, table, row, { noAutoRelationships: true, }) row = processed.row + table = processed.table let fieldName: any let schema: any