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
This commit is contained in:
Cédric Krier
2024-01-11 16:30:10 +01:00
parent 970f40f3be
commit eb450247ee
+3 -2
View File
@@ -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;
}