From f4fe85e477dbea0f1a67f8aab0ed90960b5d95fb Mon Sep 17 00:00:00 2001
From: "S.Listl" <S.Listl@SLISTL.aditosoftware.local>
Date: Wed, 29 Jan 2020 16:52:04 +0100
Subject: [PATCH] ObjectTree onUpdate fixed

---
 .../recordcontainers/jdito/onUpdate.js                 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/entity/ObjectTree_entity/recordcontainers/jdito/onUpdate.js b/entity/ObjectTree_entity/recordcontainers/jdito/onUpdate.js
index 70af0573d33..eeb63ca799b 100644
--- a/entity/ObjectTree_entity/recordcontainers/jdito/onUpdate.js
+++ b/entity/ObjectTree_entity/recordcontainers/jdito/onUpdate.js
@@ -1,7 +1,9 @@
 import("system.vars");
 import("Sql_lib");
 
-var objectRelationId = vars.get("$local.rowdata")["OBJECTRELATIONID.value"];
-
-newWhereIfSet("AB_OBJECTRELATION.AB_OBJECTRELATIONID", objectRelationId)
-    .updateFields({"INFO" : rowdata["INFO.value"]});
+if (vars.get("$local.changed").indexOf("INFO.value") !== -1)
+{
+    var rowdata = vars.get("$local.rowdata");
+    newWhereIfSet("AB_OBJECTRELATION.AB_OBJECTRELATIONID", rowdata["OBJECTRELATIONID.value"])
+        .updateFields({"INFO" : rowdata["INFO.value"]});
+}
-- 
GitLab