From 4df5fad081c3599fd1690d71a3a0bf61eaf1398e Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 20 Mar 2019 10:29:58 -0600 Subject: [PATCH] Historylog widget - some fixes for null values - Don't warn about crazy diff value on null / empty - Don't fail multi-part changes if one part is null / empty --- api/js/etemplate/et2_widget_historylog.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_widget_historylog.js b/api/js/etemplate/et2_widget_historylog.js index 3ccf29fb75..c2d0e56f87 100644 --- a/api/js/etemplate/et2_widget_historylog.js +++ b/api/js/etemplate/et2_widget_historylog.js @@ -587,7 +587,8 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e for(var j = 0; j < widget._children.length; j++) { var id = widget._children[j].id; - widget._children[j].setDetachedAttributes(nodes[j], {value:value[id]}); + var widget_value = value ? value[id] || "" : ""; + widget._children[j].setDetachedAttributes(nodes[j], {value:widget_value}); box.append(nodes[j]); } nodes = box; @@ -612,7 +613,7 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e * @returns {Boolean} */ _needsDiffWidget: function(columnName, value) { - if(typeof value !== "string") + if(typeof value !== "string" && value) { this.egw().debug("warn", "Crazy diff value", value); return false;