mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-25 22:20:05 -05:00
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
This commit is contained in:
1 parent
abd0748a77
commit
783b7516a7
2 files changed
+8
-5
No files matched your search
+7
-5
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user