mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where foreign key is not removed even if the referred table is removed in ERD. Fixes #7238
This commit is contained in:
committed by
Akshay Joshi
parent
08880ebd2e
commit
3299b0c1b0
@@ -547,8 +547,10 @@ def translate_foreign_keys(tab_fks, tab_data, all_nodes):
|
||||
for tab_fk in tab_fks:
|
||||
if 'columns' not in tab_fk:
|
||||
continue
|
||||
print(tab_data)
|
||||
remote_table = all_nodes[tab_fk['columns'][0]['references']]
|
||||
try:
|
||||
remote_table = all_nodes[tab_fk['columns'][0]['references']]
|
||||
except KeyError:
|
||||
continue
|
||||
tab_fk['schema'] = tab_data['schema']
|
||||
tab_fk['table'] = tab_data['name']
|
||||
tab_fk['remote_schema'] = remote_table['schema']
|
||||
|
||||
Reference in New Issue
Block a user