From cd48973842416004a55b155ebcd48da65c7cf8ff Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 26 Jul 2007 08:32:40 +0000 Subject: [PATCH] kernel: fix workflow bug introduce by improvement bzr revid: ced-a85aab92dc599823809653f93f2dafbc770e5c14 --- bin/workflow/workitem.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/workflow/workitem.py b/bin/workflow/workitem.py index 5fbf7ee7fe3..c4774a8c420 100644 --- a/bin/workflow/workitem.py +++ b/bin/workflow/workitem.py @@ -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