Fix autoids when importing internal data

This commit is contained in:
adrinr 2023-03-30 10:12:50 +01:00
parent 774641259f
commit 420cfd0f96
1 changed files with 4 additions and 3 deletions

View File

@ -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