Browse Source

fix(at-import): skip processing empty rows

Re #4176

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/4156/head
mertmit 2 years ago
parent
commit
255d690509
  1. 6
      packages/nocodb/src/lib/meta/api/sync/helpers/job.ts

6
packages/nocodb/src/lib/meta/api/sync/helpers/job.ts

@ -1333,6 +1333,12 @@ export default async (
for (const [key, value] of Object.entries(rec as { [key: string]: any })) { for (const [key, value] of Object.entries(rec as { [key: string]: any })) {
// retrieve datatype // retrieve datatype
const dt = table.columns.find((x) => x.title === key)?.uidt; const dt = table.columns.find((x) => x.title === key)?.uidt;
// always process LTAR, Lookup, and Rollup columns as we delete the key after processing
if (!value && dt !== UITypes.LinkToAnotherRecord && dt !== UITypes.Lookup && dt !== UITypes.Rollup) {
rec[key] = null;
continue;
}
switch (dt) { switch (dt) {
// https://www.npmjs.com/package/validator // https://www.npmjs.com/package/validator

Loading…
Cancel
Save