From 36af0f88a4adbe697f20f8f65d0dff2837b96b74 Mon Sep 17 00:00:00 2001 From: Sebastian Listl <s.listl@adito.de> Date: Fri, 28 Aug 2020 11:43:54 +0200 Subject: [PATCH] Attribute onUpdate and onDelete used wrong uid --- entity/Attribute_entity/recordcontainers/jdito/onDelete.js | 4 ++-- entity/Attribute_entity/recordcontainers/jdito/onUpdate.js | 2 +- neonView/AttributePreview_view/AttributePreview_view.aod | 4 ---- process/Entity_lib/process.js | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/entity/Attribute_entity/recordcontainers/jdito/onDelete.js b/entity/Attribute_entity/recordcontainers/jdito/onDelete.js index e4969d923b..fc8ed47c69 100644 --- a/entity/Attribute_entity/recordcontainers/jdito/onDelete.js +++ b/entity/Attribute_entity/recordcontainers/jdito/onDelete.js @@ -2,10 +2,10 @@ import("Sql_lib"); import("system.vars"); import("Attribute_lib"); -newWhere("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$field.UID") +newWhere("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$local.uid") .deleteData(); -var attributeId = vars.get("$field.UID"); +var attributeId = vars.get("$local.uid"); var childIds = AttributeUtil.getAllChildren(attributeId).concat(attributeId); diff --git a/entity/Attribute_entity/recordcontainers/jdito/onUpdate.js b/entity/Attribute_entity/recordcontainers/jdito/onUpdate.js index f12f4d4491..b3012b5a5b 100644 --- a/entity/Attribute_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/Attribute_entity/recordcontainers/jdito/onUpdate.js @@ -20,5 +20,5 @@ vars.get("$local.changed").forEach(function (field) fieldValues[dbField] = rowdata[field] || ""; }); -newWhere("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$field.UID") +newWhere("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$local.uid") .updateFields(fieldValues); diff --git a/neonView/AttributePreview_view/AttributePreview_view.aod b/neonView/AttributePreview_view/AttributePreview_view.aod index 88b71eba21..f7164ab694 100644 --- a/neonView/AttributePreview_view/AttributePreview_view.aod +++ b/neonView/AttributePreview_view/AttributePreview_view.aod @@ -34,10 +34,6 @@ <name>70953962-9472-484b-ac95-567d2249f42e</name> <entityField>ATTRIBUTE_ACTIVE</entityField> </entityFieldLink> - <entityFieldLink> - <name>1b1cfdcb-fcab-4ca9-b0e0-b69fe88b65f0</name> - <entityField>SORTING</entityField> - </entityFieldLink> </fields> </genericViewTemplate> <neonViewReference> diff --git a/process/Entity_lib/process.js b/process/Entity_lib/process.js index 93360446bc..126ef4f9e1 100644 --- a/process/Entity_lib/process.js +++ b/process/Entity_lib/process.js @@ -233,7 +233,7 @@ HasLinkedObjectTester._testForConsumer = function () */ HasLinkedObjectTester._testForCallback = function () { - fnResult = this.callbackFn(); + var fnResult = this.callbackFn(); return this.failValue ? fnResult != this.failValue : fnResult; -- GitLab