public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM4506] "can't execute an empty query" message displayed if user remove fill factor of any existing table
Date: Mon, 9 Dec 2019 15:32:58 +0530
Message-ID: <CAM9w-_kNeQ5EANaFoFEB4UFFM03NAZBuwQzFmBdFd59rpWfriw@mail.gmail.com> (raw)
Hi Hackers,
Attached is the patch to fix an issue where just clicking on an
empty textbox like fill factor in tables dialog considers it a change and
so the save button is enabled.
The fix is common will apply at other places also.
Kindly review.
--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
Attachments:
[application/octet-stream] RM4506.patch (668B, 3-RM4506.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/static/js/datamodel.js b/web/pgadmin/browser/static/js/datamodel.js
index 514c40392..8a0288a99 100644
--- a/web/pgadmin/browser/static/js/datamodel.js
+++ b/web/pgadmin/browser/static/js/datamodel.js
@@ -367,7 +367,8 @@ define([
return;
}
attrs[k] = v;
- if (_.isEqual(self.origSessAttrs[k], v)) {
+ /* If the orig value was null and new one is empty string, then its a "no change" */
+ if (_.isEqual(self.origSessAttrs[k], v) || (self.origSessAttrs[k] === null && v === '')) {
delete self.sessAttrs[k];
} else {
self.sessAttrs[k] = v;
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][RM4506] "can't execute an empty query" message displayed if user remove fill factor of any existing table
In-Reply-To: <CAM9w-_kNeQ5EANaFoFEB4UFFM03NAZBuwQzFmBdFd59rpWfriw@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