Recreate the node item in the tree, when 'id' has been changed of the node.

Fixes #5053
This commit is contained in:
Ashesh Vashi
2020-04-23 11:11:05 +05:30
parent c76732e3e7
commit 637c80c38b

View File

@@ -1660,16 +1660,16 @@ define('pgadmin.browser', [
}
// If server icon/background changes then also we need to re-create it
if(_old._type == 'server' && _new._type == 'server' &&
( _old._pid != _new._pid ||
if ((
_old._type == 'server' && _new._type == 'server' && (
_old._pid != _new._pid ||
_old._label != _new._label ||
_old.icon != _new.icon )
_old.icon != _new.icon
)) || _old._pid != _new._pid || _old._label != _new._label ||
_old._id != _new._id
) {
ctx.op = 'RECREATE';
traversePath();
} else if (_old._pid != _new._pid || _old._label != _new._label) {
ctx.op = 'RECREATE';
traversePath();
} else {
ctx.op = 'UPDATE';
traversePath();