summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorced <>2007-07-26 08:32:40 +0000
committerced <>2007-07-26 08:32:40 +0000
commitcd48973842416004a55b155ebcd48da65c7cf8ff (patch)
treed638b073a813372150ec754e3ca45f715936ed8b
parent0e8e28ef6cf26691110bc3df56703d002da376b3 (diff)
kernel: fix workflow bug introduce by improvement
bzr revid: ced-a85aab92dc599823809653f93f2dafbc770e5c14
-rw-r--r--bin/workflow/workitem.py6
1 files 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