mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06: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:
@@ -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