Browse Source

fix: column delete logic correction

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

9
packages/nocodb/src/services/columns.service.ts

@ -1186,15 +1186,8 @@ export class ColumnsService {
case UITypes.Formula: case UITypes.Formula:
await Column.delete(param.columnId, ncMeta); await Column.delete(param.columnId, ncMeta);
break; break;
// When deleting a link column, we need to delete the relation column // Since Links is just an extended version of LTAR, we can use the same logic
// while deleting the LTAR column, links column will be deleted automatically
case UITypes.Links: case UITypes.Links:
return await column.getColOptions<RollupColumn>().then((colOpt) =>
this.columnDelete({
...param,
columnId: colOpt.fk_relation_column_id,
}),
);
case UITypes.LinkToAnotherRecord: case UITypes.LinkToAnotherRecord:
{ {
const relationColOpt = const relationColOpt =

Loading…
Cancel
Save