diff options
| author | ced <> | 2007-07-26 08:32:40 +0000 |
|---|---|---|
| committer | ced <> | 2007-07-26 08:32:40 +0000 |
| commit | cd48973842416004a55b155ebcd48da65c7cf8ff (patch) | |
| tree | d638b073a813372150ec754e3ca45f715936ed8b | |
| parent | 0e8e28ef6cf26691110bc3df56703d002da376b3 (diff) | |
kernel: fix workflow bug introduce by improvement
bzr revid: ced-a85aab92dc599823809653f93f2dafbc770e5c14
| -rw-r--r-- | bin/workflow/workitem.py | 6 |
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 |
