Browse Source

fix: use ids instead of titles for at import

Signed-off-by: mertmit <mertmit99@gmail.com>
nc-fix/json-clamp
mertmit 1 year ago
parent
commit
091a5fde4a
  1. 2
      packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts
  2. 4
      packages/nocodb/src/modules/jobs/jobs/at-import/helpers/readAndProcessData.ts

2
packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts

@ -2428,7 +2428,7 @@ export class AtImportProcessor {
rtc.data.nestedLinks += await importLTARData({ rtc.data.nestedLinks += await importLTARData({
table: ncTbl, table: ncTbl,
baseName: syncDB.baseName, baseName: syncDB.baseId,
atBase, atBase,
fields: null, //Object.values(tblLinkGroup).flat(), fields: null, //Object.values(tblLinkGroup).flat(),
logBasic, logBasic,

4
packages/nocodb/src/modules/jobs/jobs/at-import/helpers/readAndProcessData.ts

@ -146,7 +146,7 @@ export async function importData({
await services.bulkDataService.bulkDataInsert({ await services.bulkDataService.bulkDataInsert({
baseName, baseName,
tableName: table.title, tableName: table.id,
body: insertArray, body: insertArray,
cookie: {}, cookie: {},
skip_hooks: true, skip_hooks: true,
@ -394,7 +394,7 @@ export async function importLTARData({
await services.bulkDataService.bulkDataInsert({ await services.bulkDataService.bulkDataInsert({
baseName, baseName,
tableName: assocMeta.modelMeta.title, tableName: assocMeta.modelMeta.id,
body: assocTableData, body: assocTableData,
cookie: {}, cookie: {},
skip_hooks: true, skip_hooks: true,

Loading…
Cancel
Save