public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin][Patch] Bug #5886 - New foreign key creation on exist table
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin][Patch] Bug #5886 - New foreign key creation on exist table
@ 2020-12-01 05:34 Yogesh Mahajan <[email protected]>
2020-12-01 06:07 ` Re: [pgAdmin][Patch] Bug #5886 - New foreign key creation on exist table Akshay Joshi <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Yogesh Mahajan @ 2020-12-01 05:34 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
Please find the attached patch which fixes the false error shown while
adding a new foreign key from table dialogue in case of an already existing
foreign key with Auto FK Index=True to table.
Thanks,
Yogesh Mahajan
EnterpriseDB
Attachments:
[application/x-patch] RM5886_v1.patch (1.4K, 3-RM5886_v1.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/static/js/foreign_key.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/static/js/foreign_key.js
index 302728bad..a36d385ae 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/static/js/foreign_key.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/static/js/foreign_key.js
@@ -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;
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin][Patch] Bug #5886 - New foreign key creation on exist table
2020-12-01 05:34 [pgAdmin][Patch] Bug #5886 - New foreign key creation on exist table Yogesh Mahajan <[email protected]>
@ 2020-12-01 06:07 ` Akshay Joshi <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2020-12-01 06:07 UTC (permalink / raw)
To: Yogesh Mahajan <[email protected]>; +Cc: pgadmin-hackers
Thanks, patch applied.
On Tue, Dec 1, 2020 at 11:04 AM Yogesh Mahajan <
[email protected]> wrote:
> Hi,
>
> Please find the attached patch which fixes the false error shown while
> adding a new foreign key from table dialogue in case of an already existing
> foreign key with Auto FK Index=True to table.
>
> Thanks,
> Yogesh Mahajan
> EnterpriseDB
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-12-01 06:07 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 05:34 [pgAdmin][Patch] Bug #5886 - New foreign key creation on exist table Yogesh Mahajan <[email protected]>
2020-12-01 06:07 ` Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox