mirror of
https://github.com/NaN-tic/sao-base.git
synced 2023-12-14 03:13:01 +01:00
Ensure Float.get_client returns a string
otherwise 0 could be evaluated as False.
This commit is contained in:
parent
b08b3bf987
commit
aca576b860
|
@ -1544,7 +1544,7 @@
|
||||||
if (digits) {
|
if (digits) {
|
||||||
return (value * factor).toFixed(digits[1]);
|
return (value * factor).toFixed(digits[1]);
|
||||||
} else {
|
} else {
|
||||||
return (value * factor);
|
return '' + (value * factor);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
|
|
|
@ -2431,7 +2431,7 @@
|
||||||
if (record) {
|
if (record) {
|
||||||
var value = record.model.fields[this.field_name]
|
var value = record.model.fields[this.field_name]
|
||||||
.get_client(record, this.factor);
|
.get_client(record, this.factor);
|
||||||
this.input.val(value || '');
|
this.input.val(value);
|
||||||
} else {
|
} else {
|
||||||
this.input.val('');
|
this.input.val('');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue