From bfce7058ce0590be1631b04b232a396259c901f7 Mon Sep 17 00:00:00 2001 From: mertmit Date: Tue, 16 Jan 2024 23:01:43 +0000 Subject: [PATCH] fix: serialize default value --- .../src/modules/jobs/jobs/export-import/export.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts index 4b6e57014e..0312d77f80 100644 --- a/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts +++ b/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts @@ -158,12 +158,13 @@ export class ExportService { // pg default value fix if (source.type === 'pg') { if (column.cdf) { + const cdf = column.cdf.toString(); // check if column.cdf has unmatched single quotes - const matches = column.cdf.match(/'/g); + const matches = 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); + const lastQuoteIndex = cdf.lastIndexOf("'"); + column.cdf = cdf.substring(0, lastQuoteIndex); } } }