Browse Source

Merge pull request #7614 from nocodb/fix/airtable-ltar-import-error

fix: airtable ltar error
pull/7617/head
Mert E 9 months ago committed by GitHub
parent
commit
a1b5c20b59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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