From f7f761621dfb22f2e4401dd1567fae13d2df4286 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 (grafted from a93577ad420c3bab09fb905efab954e4aaf0fbab) --HG-- branch : 7.0 --- 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 3c87213edb..134f847e9e 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; }