Compare numbers to detect modified

Depending on the language settings, the input number may remove the trailing 0
(ex: fr). So we must compare the Number instances by stringify them.

issue9340
review307611002
This commit is contained in:
Cédric Krier committed 2020-05-28 18:16:23 +02:00
1 parent 398423cde6
commit 46f911be2a
1 file changed
+2 -1
+2 -1
View File
@@ -1795,7 +1795,8 @@ function eval_pyson(value){
get modified() {
if (this.record && this.field) {
var value = this.get_client_value();
return value != this.get_value();
return (JSON.stringify(this.field.convert(value)) !=
JSON.stringify(this.field.convert(this.get_value())));
}
return false;
},