diff --git a/docs/en_US/release_notes_4_12.rst b/docs/en_US/release_notes_4_12.rst index 923eeee61..f59fdad55 100644 --- a/docs/en_US/release_notes_4_12.rst +++ b/docs/en_US/release_notes_4_12.rst @@ -33,4 +33,5 @@ Bug fixes | `Issue #4520 `_ - Ensure the query tool will work with older versions of psycopg2 than we officially support, albeit without updatable resultsets. | `Issue #4525 `_ - Ensure command tags are shown in the messages tab of the Query Tool. | `Issue #4536 `_ - Fix load on demand in View/Edit data mode. -| `Issue #4552 `_ - Fix some errors thrown on the JS console when dragging text in the Query Tool. \ No newline at end of file +| `Issue #4552 `_ - Fix some errors thrown on the JS console when dragging text in the Query Tool. +| `Issue #4559 `_ - Ensure triggers should be updated properly for EPAS server. \ No newline at end of file diff --git a/web/pgadmin/static/js/tree/tree.js b/web/pgadmin/static/js/tree/tree.js index 1149a66fa..2e616be7f 100644 --- a/web/pgadmin/static/js/tree/tree.js +++ b/web/pgadmin/static/js/tree/tree.js @@ -250,11 +250,14 @@ export class Tree { register($treeJQuery) { $treeJQuery.on('acitree', function (event, api, item, eventName) { if (api.isItem(item)) { - if (eventName === 'added') { + /* If the id of node is changed, the path should also be changed */ + if (eventName === 'added' || eventName === 'idset') { const id = api.getId(item); const data = api.itemData(item); - this.prepareDraggable(data, item); + if(eventName === 'added') { + this.prepareDraggable(data, item); + } const parentId = this.translateTreeNodeIdFromACITree(api.parent(item)); this.addNewNode(id, data, item, parentId);