From 5a9119fdc8eea272270ff1d049c1be8dcafa8f52 Mon Sep 17 00:00:00 2001 From: mertmit Date: Wed, 11 Oct 2023 12:41:20 +0530 Subject: [PATCH] fix: sanitize before comparing column_names Signed-off-by: mertmit --- .../src/modules/jobs/jobs/export-import/import.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts index d9df8936f3..4780fea595 100644 --- a/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts +++ b/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts @@ -34,6 +34,7 @@ import { ViewsService } from '~/services/views.service'; import NcPluginMgrv2 from '~/helpers/NcPluginMgrv2'; import { BulkDataAliasService } from '~/services/bulk-data-alias.service'; import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; +import { sanitizeColumnName } from '~/helpers'; @Injectable() export class ImportService { @@ -149,7 +150,7 @@ export class ImportService { // map column id's with new created column id's for (const col of table.columns) { const colRef = modelData.columns.find( - (a) => a.column_name === col.column_name, + (a) => sanitizeColumnName(a.column_name) === col.column_name, ); idMap.set(colRef.id, col.id);