[FIX] bin/workflow: 'stack' variable was not initialized when sql query returned an empty set.

bzr revid: olt@tinyerp.com-20090817093301-epwojuey9j15ih3d
This commit is contained in:
Olivier Laurent 2009-08-17 11:33:01 +02:00
parent b34691c2f6
commit 68df3c4c9d
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ def delete(cr, ident):
def validate(cr, inst_id, ident, signal, force_running=False):
cr.execute("select * from wkf_workitem where inst_id=%s", (inst_id,))
stack = []
for witem in cr.dictfetchall():
stack = []
workitem.process(cr, witem, ident, signal, force_running, stack=stack)