|
|
@ -2119,25 +2119,19 @@ export class ColumnsService { |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// if custom relation then delete
|
|
|
|
// if custom relation then delete
|
|
|
|
if ( |
|
|
|
if (links?.length) { |
|
|
|
links?.length && |
|
|
|
const linkCol = await Column.get( |
|
|
|
links.every((lk) => { |
|
|
|
{ colId: links[0].fk_column_id }, |
|
|
|
try { |
|
|
|
ncMeta, |
|
|
|
return parseMetaProp(lk)?.custom; |
|
|
|
); |
|
|
|
} catch { |
|
|
|
|
|
|
|
// ignore
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
const linkCol = await Column.get(links[0].fk_column_id, ncMeta); |
|
|
|
|
|
|
|
const table = await linkCol.getModel(ncMeta); |
|
|
|
const table = await linkCol.getModel(ncMeta); |
|
|
|
NcError.columnAssociatedWithLink( |
|
|
|
NcError.columnAssociatedWithLink(column.id, { |
|
|
|
`Column is associated with custom link ${ |
|
|
|
customMessage: `Column is associated with custom link '${ |
|
|
|
linkCol.title || linkCol.column_name |
|
|
|
linkCol.title || linkCol.column_name |
|
|
|
} (${ |
|
|
|
}' (${ |
|
|
|
table.title || table.table_name |
|
|
|
table.title || table.table_name |
|
|
|
}). Please delete the link column first.`,
|
|
|
|
}). Please delete the link column first.`,
|
|
|
|
); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|