Ensure triggers should be updated properly for EPAS server. Fixes #4559

This commit is contained in:
Aditya Toshniwal 2019-08-05 12:48:27 +05:30 committed by Akshay Joshi
parent d7ee4bb932
commit b5c8c85c90
2 changed files with 7 additions and 3 deletions

View File

@ -33,4 +33,5 @@ Bug fixes
| `Issue #4520 <https://redmine.postgresql.org/issues/4520>`_ - Ensure the query tool will work with older versions of psycopg2 than we officially support, albeit without updatable resultsets.
| `Issue #4525 <https://redmine.postgresql.org/issues/4525>`_ - Ensure command tags are shown in the messages tab of the Query Tool.
| `Issue #4536 <https://redmine.postgresql.org/issues/4536>`_ - Fix load on demand in View/Edit data mode.
| `Issue #4552 <https://redmine.postgresql.org/issues/4552>`_ - Fix some errors thrown on the JS console when dragging text in the Query Tool.
| `Issue #4552 <https://redmine.postgresql.org/issues/4552>`_ - Fix some errors thrown on the JS console when dragging text in the Query Tool.
| `Issue #4559 <https://redmine.postgresql.org/issues/4559>`_ - Ensure triggers should be updated properly for EPAS server.

View File

@ -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);