[FIX] workitem: the early return in the case workitem.state == running was seemingly wrong as workitem.state is mutated in some other IFs.

bzr revid: vmt@openerp.com-20130326143937-lf4mswer4ablj46i
This commit is contained in:
Vo Minh Thu 2013-03-26 15:39:37 +01:00
parent d185f17ec6
commit 5cc71e1bab
1 changed files with 1 additions and 3 deletions

View File

@ -44,12 +44,10 @@ def create(cr, act_datas, inst_id, ident, stack):
def process(cr, workitem, ident, signal=None, force_running=False, stack=None):
assert stack is not None
cr.execute('select * from wkf_activity where id=%s', (workitem['act_id'],))
activity = cr.dictfetchone()
if workitem['state'] == 'running':
return True
triggers = False
if workitem['state'] == 'active':
triggers = True