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

Loading…
Cancel
Save