From eb450247ee0fe7eab7c16a3ad8ca281137161bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 11 Jan 2024 16:30:10 +0100 Subject: [PATCH] Consider null value as data for binary field null value is set when the widget is cleared so it should not try to read it again from the server. Closes #12926 --- sao/src/model.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sao/src/model.js b/sao/src/model.js index d864302644..1564fedd38 100644 --- a/sao/src/model.js +++ b/sao/src/model.js @@ -2804,10 +2804,11 @@ return data; }, get_data: function(record) { - var data = record._values[this.name] || []; + var data = record._values[this.name]; var prm = jQuery.when(data); if (!(data instanceof Uint8Array) && - (typeof(data) != 'string')) { + (typeof(data) != 'string') && + (data !== null)) { if (record.id < 0) { return prm; }