refactoring
bzr revid: stephane@tinyerp.com-20080728140222-9qj0d823pottrnxf
This commit is contained in:
parent
9f65174f20
commit
340e4b1d72
|
@ -2187,12 +2187,7 @@ class orm(orm_template):
|
|||
# if the object has a field named 'active', filter out all inactive
|
||||
# records unless they were explicitely asked for
|
||||
if 'active' in self._columns and (active_test and context.get('active_test', True)):
|
||||
i = 0
|
||||
active_found = False
|
||||
while i<len(args):
|
||||
if args[i][0]=='active':
|
||||
active_found = True
|
||||
i += 1
|
||||
active_found = reduce( lambda x, y: x or y == 'active', args, False )
|
||||
if not active_found:
|
||||
args.append(('active', '=', 1))
|
||||
|
||||
|
|
Loading…
Reference in New Issue