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

(cherry picked from commit 0c3a59680477c8615646d616335c80a43abf94d6)
---
 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 15f076f82f..5903600226 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