changeset 75c3930576c4 in tryton:5.2
details: https://hg.tryton.org/tryton?cmd=changeset;node=75c3930576c4
description:
        Search for '..' only on string value in domain parser

        The value can be a list if ';' is used.

        issue8706
        review254381002
        (grafted from 09c749466af798385b928969486d39a1cf48ea86)
diffstat:

 tryton/common/domain_parser.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 7238bab22917 -r 75c3930576c4 tryton/common/domain_parser.py
--- a/tryton/common/domain_parser.py    Sat Sep 28 23:23:01 2019 +0200
+++ b/tryton/common/domain_parser.py    Fri Oct 11 11:40:42 2019 +0200
@@ -1251,7 +1251,7 @@
                         operator = negate_operator(default_operator(field))
                     if field['type'] in ('integer', 'float', 'numeric',
                             'datetime', 'date', 'time'):
-                        if value and '..' in value:
+                        if isinstance(value, str) and '..' in value:
                             lvalue, rvalue = value.split('..', 1)
                             lvalue = convert_value(field, lvalue, self.context)
                             rvalue = convert_value(field, rvalue, self.context)

Reply via email to