changeset 622edeaf2012 in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset&node=622edeaf2012
description:
        Use length of field name instead of lstrip to get nested part of clause

        issue11714
        review437381003
diffstat:

 move.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r 8b4c201363d2 -r 622edeaf2012 move.py
--- a/move.py   Sun Sep 25 20:17:02 2022 +0200
+++ b/move.py   Sat Oct 01 15:35:33 2022 +0200
@@ -677,10 +677,10 @@
 
     @classmethod
     def search_move_field(cls, name, clause):
-        nested = clause[0].lstrip(name)
+        nested = clause[0][len(name):]
         if name.startswith('move_'):
             name = name[5:]
-        return [('move.' + name + nested,) + tuple(clause[1:])]
+        return [('move.' + name + nested, *clause[1:])]
 
     @staticmethod
     def _order_move_field(name):

Reply via email to