Fix autoids when importing internal data
This commit is contained in:
parent
774641259f
commit
420cfd0f96
|
@ -99,16 +99,17 @@ export function makeSureTableUpToDate(table: any, tableToSave: any) {
|
||||||
return tableToSave
|
return tableToSave
|
||||||
}
|
}
|
||||||
|
|
||||||
export function importToRows(data: any, table: any, user: any = {}) {
|
export function importToRows(data: any, table: Table, user: any = {}) {
|
||||||
let finalData: any = []
|
let finalData: any = []
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
let row = data[i]
|
let row = data[i]
|
||||||
row._id = generateRowID(table._id)
|
row._id = generateRowID(table._id!)
|
||||||
row.tableId = table._id
|
row.tableId = table._id
|
||||||
const processed: any = inputProcessing(user, table, row, {
|
const processed = inputProcessing(user, table, row, {
|
||||||
noAutoRelationships: true,
|
noAutoRelationships: true,
|
||||||
})
|
})
|
||||||
row = processed.row
|
row = processed.row
|
||||||
|
table = processed.table
|
||||||
|
|
||||||
let fieldName: any
|
let fieldName: any
|
||||||
let schema: any
|
let schema: any
|
||||||
|
|
Loading…
Reference in New Issue