mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix an issue where pgAdmin4 unable to retrieve table node if the trigger is already disabled and the user clicks on Enable All. Fixes #4953.
This commit is contained in:
committed by
Akshay Joshi
parent
d95e8db4ee
commit
ae2aadeede
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user