public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin 4][Patch] - RM #4953 - Unable to retrieve table node if trigger is already disabled and user Click on Enable All
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin 4][Patch] - RM #4953 - Unable to retrieve table node if trigger is already disabled and user Click on Enable All
@ 2019-12-02 08:54 Khushboo Vashi <[email protected]>
  2019-12-02 09:57 ` Re: [pgAdmin 4][Patch] - RM #4953 - Unable to retrieve table node if trigger is already disabled and user Click on Enable All Akshay Joshi <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Khushboo Vashi @ 2019-12-02 08:54 UTC (permalink / raw)
  To: pgadmin-hackers

Hi,

Please find the attached patch to fix the RM #4953 - Unable to retrieve
table node if trigger is already disabled and user Click on Enable All.

Thanks,
Khushboo


Attachments:

  [application/octet-stream] RM_4953.patch (1.7K, 3-RM_4953.patch)
  download | inline diff:
diff --git a/web/pgadmin/static/js/tree/pgadmin_tree_node.js b/web/pgadmin/static/js/tree/pgadmin_tree_node.js
index 2a74fd115..f5a3e6e91 100644
--- a/web/pgadmin/static/js/tree/pgadmin_tree_node.js
+++ b/web/pgadmin/static/js/tree/pgadmin_tree_node.js
@@ -43,6 +43,7 @@ export function getTreeNodeHierarchyFromElement(pgBrowser, treeNode) {
 export function getTreeNodeHierarchyFromIdentifier(aciTreeNodeIdentifier) {
   let identifier = this.treeMenu.translateTreeNodeIdFromACITree(aciTreeNodeIdentifier);
   let currentNode = this.treeMenu.findNode(identifier);
+  if (currentNode === null) return null;
   return getTreeNodeHierarchy.call(this, currentNode);
 }
 
diff --git a/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js b/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js
index d4340833a..999027e9e 100644
--- a/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js
+++ b/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js
@@ -211,7 +211,7 @@ _.extend(pgBrowser.browserTreeState, {
       node = data && pgBrowser.Nodes[data._type],
       treeHierarchy = node && node.getTreeNodeHierarchy(item);
 
-    if (!pgBrowser.tree.hasParent(item) || !(self.parent in treeHierarchy))
+    if (treeHierarchy === null || !pgBrowser.tree.hasParent(item) || !(self.parent in treeHierarchy))
       return;
 
     let topParent = treeHierarchy && treeHierarchy[self.parent]['_id'],
@@ -269,7 +269,7 @@ _.extend(pgBrowser.browserTreeState, {
       treeHierarchy = node && node.getTreeNodeHierarchy(item);
 
 
-    if (!pgBrowser.tree.hasParent(item) || !(self.parent in treeHierarchy))
+    if (treeHierarchy === null || !pgBrowser.tree.hasParent(item) || !(self.parent in treeHierarchy))
       return;
 
     // If the server node is open then only we should populate the tree


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin 4][Patch] - RM #4953 - Unable to retrieve table node if trigger is already disabled and user Click on Enable All
  2019-12-02 08:54 [pgAdmin 4][Patch] - RM #4953 - Unable to retrieve table node if trigger is already disabled and user Click on Enable All Khushboo Vashi <[email protected]>
@ 2019-12-02 09:57 ` Akshay Joshi <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Akshay Joshi @ 2019-12-02 09:57 UTC (permalink / raw)
  To: Khushboo Vashi <[email protected]>; +Cc: pgadmin-hackers

Thanks, patch applied.

On Mon, Dec 2, 2019 at 2:24 PM Khushboo Vashi <
[email protected]> wrote:

> Hi,
>
> Please find the attached patch to fix the RM #4953 - Unable to retrieve
> table node if trigger is already disabled and user Click on Enable All.
>
> Thanks,
> Khushboo
>
>

-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-12-02 09:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 08:54 [pgAdmin 4][Patch] - RM #4953 - Unable to retrieve table node if trigger is already disabled and user Click on Enable All Khushboo Vashi <[email protected]>
2019-12-02 09:57 ` 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