public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pradip Parkale <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM5835]: "can't execute an empty query" message displayed if user change the option of Auto FK index ? with No
Date: Tue, 6 Oct 2020 13:51:03 +0530
Message-ID: <CAJ9T6Su4pz-Ki9FhCYXja=vyVJNhre3ivFvCMCOKiCU1u9HRfg@mail.gmail.com> (raw)

Hi Hackers,
Attached is small patch to disable the Auto FK index? option to avoid
'can't execute an empty query' message.

-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


Attachments:

  [application/octet-stream] RM5835.patch (960B, 3-RM5835.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 a02ecf0b7..547e3d167 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
@@ -814,6 +814,9 @@ define('pgadmin.node.foreign_key', [
             onText: gettext('Yes'),
             offText: gettext('No'),
           },disabled: function(m) {
+            // Don't allow to edit the auto index setting in edit mode
+            if(!m.isNew())
+              return true;
             var index = m.get('coveringindex'),
               autoindex = m.get('autoindex'),
               setIndexName = function() {


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin][RM5835]: "can't execute an empty query" message displayed if user change the option of Auto FK index ? with No
  In-Reply-To: <CAJ9T6Su4pz-Ki9FhCYXja=vyVJNhre3ivFvCMCOKiCU1u9HRfg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox