Browse Source

fix: skip exporting all mms if fields provided

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6953/head
mertmit 1 year ago
parent
commit
94f9fc8d6b
  1. 10
      packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts

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

@ -408,9 +408,13 @@ export class ExportService {
.map((c) => c.title) .map((c) => c.title)
.join(','); .join(',');
const mmColumns = model.columns.filter( const mmColumns = param._fieldIds
(col) => isLinksOrLTAR(col) && col.colOptions?.type === 'mm', ? model.columns
); .filter((c) => param._fieldIds?.includes(c.id))
.filter((col) => isLinksOrLTAR(col) && col.colOptions?.type === 'mm')
: model.columns.filter(
(col) => isLinksOrLTAR(col) && col.colOptions?.type === 'mm',
);
const hasLink = mmColumns.length > 0; const hasLink = mmColumns.length > 0;

Loading…
Cancel
Save