Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/en_US/release_notes_9_16.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ Housekeeping

Bug fixes
*********

| `Issue #8318 <https://github.com/pgadmin-org/pgadmin4/issues/8318>`_ - Fixed an error ("i.default.find(...) is undefined") that prevented deleting a table or relationship link in the ERD tool when a foreign key referenced a column that had been renamed.
2 changes: 1 addition & 1 deletion web/pgadmin/tools/erd/static/js/erd_tool/ERDCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ export default class ERDCore {
let newForeingKeys = [];
tableData.foreign_key?.forEach((theFkRow)=>{
let theFk = theFkRow.columns[0];
Comment on lines 526 to 528
let attnum = _.find(tableNode.getColumns(), (col)=>col.name==theFk.local_column).attnum;
let attnum = _.find(tableNode.getColumns(), (col)=>col.name==theFk.local_column)?.attnum;
/* Skip all those whose attnum and table matches to the link */
if(linkData.local_column_attnum != attnum || linkData.referenced_table_uid != theFk.references) {
newForeingKeys.push(theFkRow);
Expand Down
Loading