From 61ca0dd92cc23f20a610a3c2b78dfb708ab14964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 27 Aug 2011 16:04:36 +0200 Subject: [PATCH] Don't try to detect rounding issue with MySQL review74005 --- trytond/model/modelstorage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trytond/model/modelstorage.py b/trytond/model/modelstorage.py index 54a2540e4f..7bf882bda6 100644 --- a/trytond/model/modelstorage.py +++ b/trytond/model/modelstorage.py @@ -25,6 +25,7 @@ from trytond.const import OPERATORS, RECORD_CACHE_SIZE from trytond.transaction import Transaction from trytond.pool import Pool from trytond.cache import LRUDict +from trytond.config import CONFIG class ModelStorage(Model): @@ -1108,7 +1109,7 @@ class ModelStorage(Model): if not (value.quantize(Decimal(str(10.0**-digits[1]))) == value): raise_user_error() - else: + elif CONFIG.options['db_type'] != 'mysql': if not (round(value, digits[1]) == float(value)): raise_user_error() # validate digits