changeset 7eec360324a9 in proteus:default
details: https://hg.tryton.org/proteus?cmd=changeset&node=7eec360324a9
description:
Remove no longer needed Decimal to float conversion on read
The XML-RPC protocol makes the distinction between float and Decimal.
issue10735
review352711002
diffstat:
proteus/__init__.py | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diffs (16 lines):
diff -r 49b4452f9993 -r 7eec360324a9 proteus/__init__.py
--- a/proteus/__init__.py Thu Sep 23 10:22:01 2021 +0200
+++ b/proteus/__init__.py Thu Sep 23 23:09:16 2021 +0200
@@ -959,12 +959,6 @@
fields.append('_timestamp')
self._values.update(
self._proxy.read([self.id], fields, self._context)[0])
- for field in fields:
- if (field in self._fields
- and self._fields[field]['type'] == 'float'
- and isinstance(self._values[field], Decimal)):
- # XML-RPC return Decimal for double
- self._values[field] = float(self._values[field])
def _default_get(self):
'Set default values'