Fixed false error is shown while adding a new foreign key from the table dialog when a foreign key already exists with Auto FK Index set to true. Fixes #5886

pull/37/head
Yogesh Mahajan 2020-12-01 11:35:01 +05:30 committed by Akshay Joshi
parent abd0748a77
commit 783b7516a7
2 changed files with 8 additions and 5 deletions

View File

@ -20,6 +20,7 @@ Housekeeping
Bug fixes
*********
| `Issue #5886 <https://redmine.postgresql.org/issues/5886>`_ - Fixed false error is shown while adding a new foreign key from the table dialog when a foreign key already exists with Auto FK Index set to true.
| `Issue #5943 <https://redmine.postgresql.org/issues/5943>`_ - Ensure that folder rename should work properly in Storage Manager.
| `Issue #5974 <https://redmine.postgresql.org/issues/5974>`_ - Fixed an issue where the debugger's custom tab title not applied when opened in the new browser tab.
| `Issue #5978 <https://redmine.postgresql.org/issues/5978>`_ - Fixed an issue where dynamic tab title has not applied the first time for debugger panel.

View File

@ -1097,11 +1097,13 @@ define('pgadmin.node.foreign_key', [
var coveringindex = this.get('coveringindex'),
autoindex = this.get('autoindex');
if (autoindex && (_.isUndefined(coveringindex) || _.isNull(coveringindex) ||
String(coveringindex).replace(/^\s+|\s+$/g, '') == '')) {
msg = gettext('Please specify covering index name.');
this.errorModel.set('coveringindex', msg);
return msg;
if (this.isNew()){
if (autoindex && (_.isUndefined(coveringindex) || _.isNull(coveringindex) ||
String(coveringindex).replace(/^\s+|\s+$/g, '') == '')) {
msg = gettext('Please specify covering index name.');
this.errorModel.set('coveringindex', msg);
return msg;
}
}
return null;