From 551b6faeaca3dcdf4d4c00913ddea9b8345d17de Mon Sep 17 00:00:00 2001 From: "b.ulrich" <b.ulrich@adito.de> Date: Tue, 12 May 2020 14:18:39 +0200 Subject: [PATCH] [Projekt: Entwicklung - Neon][TicketNr.: 1054657][Person Index affectedIds retrurn [null]] --- entity/Person_entity/recordcontainers/index/affectedIds.js | 6 ++---- process/IndexSearch_lib/process.js | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/entity/Person_entity/recordcontainers/index/affectedIds.js b/entity/Person_entity/recordcontainers/index/affectedIds.js index dbd08b2c4ba..24ea484ba1e 100644 --- a/entity/Person_entity/recordcontainers/index/affectedIds.js +++ b/entity/Person_entity/recordcontainers/index/affectedIds.js @@ -49,9 +49,7 @@ switch (tableName) break; } -if (res && res[0]) +if (res) { result.object(res); - -else - result.object([]); +} \ No newline at end of file diff --git a/process/IndexSearch_lib/process.js b/process/IndexSearch_lib/process.js index b39ce87ed06..bb66f61baf4 100644 --- a/process/IndexSearch_lib/process.js +++ b/process/IndexSearch_lib/process.js @@ -33,7 +33,10 @@ IndexsearchUtils.getAffectedIdValues = function(fieldname, affectedInfoContainer affectedIds = [affectedInfoContainer.oldValues[affectedInfoContainer.columns.indexOf(fieldname)]]; break; } - return affectedIds || []; + if(affectedIds.length > 0) + return affectedIds || []; + else + return [] } /** -- GitLab