changeset 0757581c0ae7 in tryton:4.6
details: https://hg.tryton.org/tryton?cmd=changeset;node=0757581c0ae7
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 b553d8464a9d -r 0757581c0ae7 tryton/common/domain_parser.py
--- a/tryton/common/domain_parser.py    Sun Sep 15 14:19:21 2019 +0200
+++ b/tryton/common/domain_parser.py    Fri Oct 11 11:40:42 2019 +0200
@@ -1188,7 +1188,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