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.pull/26/head
parent
7c271d21ae
commit
2790689d26
|
@ -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([
|
||||
|
|
Loading…
Reference in New Issue