Commit fa499ad4 authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_json_editor: Fixup typecast for boolean

   Select sets "1" and "" as values
parent 08171a5c
......@@ -121,10 +121,10 @@
if (this.schema.type === 'boolean' && (typeof value == "boolean")) {
return value;
}
if (this.schema.type === 'boolean' && (value == "true")) {
if (this.schema.type === 'boolean' && (value === "true" || value === "1")) {
return true;
}
if (this.schema.type === 'boolean' && (value == "false")) {
if (this.schema.type === 'boolean' && (value === "false" || value === "")) {
return false;
}
if (this.schema.type === 'number' && value === "") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment