mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-14 00:51:59 -05:00
1) Fix issue where validate switch for the foreign key is enabled from table dialog even if the key is validated.
2) Fix issue where validate the foreign key from the table dialog, rename the foreign key constraint to none.
This commit is contained in:
1 parent
7c271d21ae
commit
2790689d26
2 files changed
+4
-1
No files matched your search
+1
-1
@@ -793,7 +793,7 @@ define('pgadmin.node.foreign_key', [
|
||||
if (_.has(m, 'handler') && !_.isUndefined(m.handler)) {
|
||||
// If OID is undefined then user is trying to add
|
||||
// new constraint which should allowed
|
||||
return !(_.isUndefined(m.get('oid')) || m.get('convalidated'));
|
||||
return !(_.isUndefined(m.get('oid')) || !m.get('convalidated'));
|
||||
}
|
||||
// We can't update condeferred of existing foreign key.
|
||||
return !(m.isNew() || !m.get('convalidated'));
|
||||
|
||||
@@ -1495,6 +1495,9 @@ class BaseTableView(PGChildNodeView, BasePartitionTable):
|
||||
return internal_server_error(errormsg=res)
|
||||
|
||||
old_data = res['rows'][0]
|
||||
if 'name' not in c:
|
||||
c['name'] = old_data['name']
|
||||
|
||||
# Sql to update object
|
||||
sql.append(
|
||||
render_template("/".join([
|
||||
|
||||
Reference in new issue
Block a user