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
This commit is contained in:
nathangray 2019-03-20 10:29:58 -06:00
parent 5bd20d080c
commit 4df5fad081

View File

@ -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;