From 315c0850c62e410d6090ea8b7e212f473a8668d4 Mon Sep 17 00:00:00 2001 From: mertmit Date: Tue, 2 May 2023 23:10:03 +0300 Subject: [PATCH] fix: filter models with base_id on export Signed-off-by: mertmit --- .../src/modules/jobs/export-import/duplicate.processor.ts | 3 ++- .../src/modules/jobs/export-import/export.service.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts b/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts index 9aeddc5e62..2e7fcba3ca 100644 --- a/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts +++ b/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts @@ -53,7 +53,8 @@ export class DuplicateProcessor { const user = (req as any).user; const models = (await base.getModels()).filter( - (m) => !m.mm && m.type === 'table', + // TODO revert this when issue with cache is fixed + (m) => m.base_id === base.id && !m.mm && m.type === 'table', ); const exportedModels = await this.exportService.serializeModels({ diff --git a/packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts b/packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts index 23b3dd2fde..79c9e2de47 100644 --- a/packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts +++ b/packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts @@ -535,7 +535,8 @@ export class ExportService { const project = await Project.get(base.project_id); const models = (await base.getModels()).filter( - (m) => !m.mm && m.type === 'table', + // TODO revert this when issue with cache is fixed + (m) => m.base_id === base.id && !m.mm && m.type === 'table', ); const exportedModels = await this.serializeModels({