Don't try to detect rounding issue with MySQL
review74005
This commit is contained in:
1 parent
7e223fe1cc
commit
61ca0dd92c
1 file changed
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user