Browse Source

fix: while deleting table delete Links column in related table as well

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5848/head
Pranav C 1 year ago
parent
commit
09fe6b73cf
  1. 6
      packages/nocodb/src/services/tables.service.ts

6
packages/nocodb/src/services/tables.service.ts

@ -2,11 +2,11 @@ import { Injectable } from '@nestjs/common';
import DOMPurify from 'isomorphic-dompurify';
import {
AuditOperationSubTypes,
AuditOperationTypes,
AuditOperationTypes, isLinksOrLTAR,
isVirtualCol,
ModelTypes,
UITypes,
} from 'nocodb-sdk';
} from 'nocodb-sdk'
import { T } from 'nc-help';
import ProjectMgrv2 from '../db/sql-mgr/v2/ProjectMgrv2';
import { NcError } from '../helpers/catchError';
@ -157,7 +157,7 @@ export class TablesService {
const base = project.bases.find((b) => b.id === table.base_id);
const relationColumns = table.columns.filter(
(c) => c.uidt === UITypes.LinkToAnotherRecord,
(c) => isLinksOrLTAR(c),
);
if (relationColumns?.length && !base.is_meta) {

Loading…
Cancel
Save