From 0c3a59680477c8615646d616335c80a43abf94d6 Mon Sep 17 00:00:00 2001
From: "j.goderbauer" <j.goderbauer@adito.de>
Date: Wed, 5 Feb 2020 11:13:54 +0100
Subject: [PATCH] Loghistory: fixed error when an empty blob-field was logged

---
 process/Loghistory_lib/process.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/process/Loghistory_lib/process.js b/process/Loghistory_lib/process.js
index 15f076f82fd..59036002263 100644
--- a/process/Loghistory_lib/process.js
+++ b/process/Loghistory_lib/process.js
@@ -346,7 +346,7 @@ LogHistoryExecutor.prototype._getFormattedValue = function (pColumnName, pDescri
     }
     else if (pDescription.translate4Log != null && pDescription.translate4Log != "") 
     {
-        var params = Translate4LogParams.generateParams(this.idValue, pValue.toString(), this.sqlAction, this.translationLanguage);
+        var params = Translate4LogParams.generateParams(this.idValue, pValue != null ? pValue.toString() : null, this.sqlAction, this.translationLanguage);
         var scriptId = "LogHistoryExecutor._getFormattedValue." 
             + this.structureDefinitionAlias + "." + this.affectedTable + "." +  pColumnName + ".translate4Log";
         pValue = process.executeScript(scriptId, pDescription.translate4Log, params, vars.get("$sys.dbalias"));
-- 
GitLab