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

Loading…
Cancel
Save