Merge lp:~dorian-kemps/unifield-server/US-6612 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5727
Proposed branch: lp:~dorian-kemps/unifield-server/US-6612
Merge into: lp:unifield-server
Diff against target: 31 lines (+4/-3)
1 file modified
bin/osv/expression.py (+4/-3)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-6612
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+382641@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/osv/expression.py'
2--- bin/osv/expression.py 2020-02-28 09:27:51 +0000
3+++ bin/osv/expression.py 2020-04-21 07:54:51 +0000
4@@ -70,7 +70,7 @@
5 raise ValueError('Bad domain expression: %r' % (exp,))
6 self.__exp = exp
7 self.__field_tables = {} # used to store the table to use for the sql generation. key = index of the leaf
8- self.__all_tables = set()
9+ self.__all_tables = []
10 self.__joins = []
11 self.__main_table = None # 'root' table. set by parse()
12 self.__DUMMY_LEAF = (1, '=', 1) # a dummy leaf that must not be parsed or sql generated
13@@ -107,7 +107,8 @@
14 return [(left, 'in', rg(ids, table, parent or table._parent_name))]
15
16 self.__main_table = table
17- self.__all_tables.add(table)
18+ if table not in self.__all_tables:
19+ self.__all_tables.append(table)
20
21 i = -1
22 while i + 1<len(self.__exp):
23@@ -130,7 +131,7 @@
24 working_table = main_table.pool.get(main_table._inherit_fields[fargs[0]][0])
25 if working_table not in self.__all_tables:
26 self.__joins.append('%s.%s=%s.%s' % (working_table._table, 'id', main_table._table, main_table._inherits[working_table._name]))
27- self.__all_tables.add(working_table)
28+ self.__all_tables.append(working_table)
29 main_table = working_table
30
31 field = working_table._columns.get(fargs[0], False)

Subscribers

People subscribed via source and target branches