kernel: fix workflow bug introduce by improvement

bzr revid: ced-a85aab92dc599823809653f93f2dafbc770e5c14
This commit is contained in:
ced
2007-07-26 08:32:40 +00:00
parent 0e8e28ef6c
commit cd48973842
+3 -3
View File
@@ -70,10 +70,10 @@ def process(cr, workitem, ident, signal=None, force_running=False):
for trans in alltrans:
if trans['trigger_model']:
ids = wkf_expr._eval_expr(cr,ident,workitem,trans['trigger_expr_id'])
for id in ids:
cr.execute('select nextval(\'wkf_workitem_id_seq\')')
for res_id in ids:
cr.execute('select nextval(\'wkf_triggers_id_seq\')')
id =cr.fetchone()[0]
cr.execute('insert into wkf_triggers (model,res_id,instance_id,workitem_id,id) values (%s,%d,%d,%d,%d)', (trans['trigger_model'],id,workitem['inst_id'], workitem['id'], id))
cr.execute('insert into wkf_triggers (model,res_id,instance_id,workitem_id,id) values (%s,%d,%d,%d,%d)', (trans['trigger_model'],res_id,workitem['inst_id'], workitem['id'], id))
return True