Don't try to detect rounding issue with MySQL

review74005
This commit is contained in:
Cédric Krier committed 2011-08-27 16:04:36 +02:00
1 parent 7e223fe1cc
commit 61ca0dd92c
1 file changed
+2 -1
+2 -1
View File
@@ -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