Revert bad commit
bzr revid: hda@hda-20090812130626-zw5ryz7iu6lht4mi
This commit is contained in:
parent
695f0ef325
commit
076c4f13d6
|
@ -103,24 +103,14 @@ class expression(object):
|
|||
left, operator, right = e
|
||||
|
||||
working_table = table
|
||||
main_table = table
|
||||
fargs = left.split('.', 1)
|
||||
index = i
|
||||
if left in table._inherit_fields:
|
||||
while True:
|
||||
field = main_table._columns.get(fargs[0], False)
|
||||
if field:
|
||||
working_table = main_table
|
||||
# self.__tables[index-1] = self.__tables[i]
|
||||
self.__tables[i] = working_table
|
||||
break
|
||||
working_table = main_table.pool.get(main_table._inherit_fields[left][0])
|
||||
if working_table not in self.__tables.values():
|
||||
self.__joins.append(('%s.%s=%s.%s' % (working_table._table, 'id', main_table._table, main_table._inherits[working_table._name]), working_table._table))
|
||||
self.__tables[index] = working_table
|
||||
index += 1
|
||||
main_table = working_table
|
||||
|
||||
working_table = table.pool.get(table._inherit_fields[left][0])
|
||||
if working_table not in self.__tables.values():
|
||||
self.__joins.append(('%s.%s=%s.%s' % (working_table._table, 'id', table._table, table._inherits[working_table._name]), working_table._table))
|
||||
|
||||
self.__tables[i] = working_table
|
||||
|
||||
fargs = left.split('.', 1)
|
||||
field = working_table._columns.get(fargs[0], False)
|
||||
if not field:
|
||||
if left == 'id' and operator == 'child_of':
|
||||
|
|
Loading…
Reference in New Issue