Browse Source

fix: airtable ltar error

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/7614/head
Raju Udava 9 months ago
parent
commit
c1e3fe06ce
  1. 5
      packages/nocodb/src/modules/jobs/jobs/at-import/helpers/readAndProcessData.ts

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

@ -414,8 +414,9 @@ export async function importLTARData({
[assocMeta.refCol.title]: id, [assocMeta.refCol.title]: id,
}); });
// links can be [] & hence assocTableDta[assocMeta.modelMeta.id] can be [].
if ( if (
assocTableData[assocMeta.modelMeta.id].length >= assocTableData[assocMeta.modelMeta.id]?.length >=
BULK_LINK_BATCH_COUNT BULK_LINK_BATCH_COUNT
) { ) {
let insertArray = assocTableData[ let insertArray = assocTableData[
@ -469,7 +470,7 @@ export async function importLTARData({
for (const assocMeta of assocTableMetas) { for (const assocMeta of assocTableMetas) {
// insert remaining data // insert remaining data
if (assocTableData[assocMeta.modelMeta.id].length >= 0) { if (assocTableData[assocMeta.modelMeta.id]?.length >= 0) {
logBasic( logBasic(
`:: Importing '${table.title}' LTAR data :: ${importedCount} - ${ `:: Importing '${table.title}' LTAR data :: ${importedCount} - ${
importedCount + assocTableData[assocMeta.modelMeta.id].length importedCount + assocTableData[assocMeta.modelMeta.id].length

Loading…
Cancel
Save