[FIX] web: field radio empty value
The get_value method of field radio returned sometines an undefined value (while it is expected to return false is there is no value). This caused traceback for siblings fields trying to access the value of an empty field radio (onchange, ...).
This commit is contained in:
@@ -1020,7 +1020,7 @@ var FieldRadio = common.AbstractField.extend(common.ReinitializeFieldMixin, {
|
||||
},
|
||||
get_value: function () {
|
||||
var value = this.get('value');
|
||||
return value instanceof Array ? value[0] : value;
|
||||
return ((value instanceof Array)? value[0] : value) || false;
|
||||
},
|
||||
render_value: function () {
|
||||
var self = this;
|
||||
|
||||
Reference in New Issue
Block a user