Browse Source

fix: filter models with base_id on export

Signed-off-by: mertmit <mertmit99@gmail.com>
feat/export-nest-dir-restructure
mertmit 2 years ago committed by starbirdtech383
parent
commit
7003c93207
  1. 3
      packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts
  2. 3
      packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts

3
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 user = (req as any).user;
const models = (await base.getModels()).filter( 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({ const exportedModels = await this.exportService.serializeModels({

3
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 project = await Project.get(base.project_id);
const models = (await base.getModels()).filter( 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({ const exportedModels = await this.serializeModels({

Loading…
Cancel
Save