Browse Source

fix: handle cdf errors on duplicate

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6965/head
mertmit 12 months ago
parent
commit
c98b2ae884
  1. 13
      packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts

13
packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts

@ -143,6 +143,19 @@ export class ExportService {
}
}
}
// pg default value fix
if (source.type === 'pg') {
if (column.cdf) {
// check if column.cdf has unmatched single quotes
const matches = column.cdf.match(/'/g);
if (matches && matches.length % 2 !== 0) {
// if so remove after last single quote
const lastQuoteIndex = column.cdf.lastIndexOf("'");
column.cdf = column.cdf.substring(0, lastQuoteIndex);
}
}
}
}
for (const view of model.views) {

Loading…
Cancel
Save