Browse Source

fix: bug with duplicating table

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5848/head
Pranav C 1 year ago
parent
commit
7263643c34
  1. 6
      packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts

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

@ -1,5 +1,5 @@
import { Readable } from 'stream'; import { Readable } from 'stream';
import { UITypes, ViewTypes } from 'nocodb-sdk'; import { isLinksOrLTAR, UITypes, ViewTypes } from 'nocodb-sdk'
import { unparse } from 'papaparse'; import { unparse } from 'papaparse';
import { Injectable, Logger } from '@nestjs/common'; import { Injectable, Logger } from '@nestjs/common';
import NcConnectionMgrv2 from '../../../../utils/common/NcConnectionMgrv2'; import NcConnectionMgrv2 from '../../../../utils/common/NcConnectionMgrv2';
@ -352,13 +352,13 @@ export class ExportService {
.map((c) => c.title) .map((c) => c.title)
.join(',') .join(',')
: model.columns : model.columns
.filter((c) => c.uidt !== UITypes.LinkToAnotherRecord) .filter((c) => !isLinksOrLTAR(c))
.map((c) => c.title) .map((c) => c.title)
.join(','); .join(',');
const mmColumns = model.columns.filter( const mmColumns = model.columns.filter(
(col) => (col) =>
col.uidt === UITypes.LinkToAnotherRecord && isLinksOrLTAR(col) &&
col.colOptions?.type === 'mm', col.colOptions?.type === 'mm',
); );

Loading…
Cancel
Save