[FIX] workflow: insertion of duplicates in many2many relation
This commit is contained in:
parent
fe73fc442c
commit
a1f1f85be2
|
@ -242,7 +242,7 @@ class WorkflowItem(object):
|
|||
transitions.append((transition['id'], self.workitem['inst_id']))
|
||||
|
||||
if test and transitions:
|
||||
cr.executemany('insert into wkf_witm_trans (trans_id,inst_id) values (%s,%s)', transitions)
|
||||
cr.executemany('insert into wkf_witm_trans (trans_id,inst_id) values (%s,%s) except (select trans_id,inst_id from wkf_witm_trans)', transitions)
|
||||
cr.execute('delete from wkf_workitem where id=%s', (self.workitem['id'],))
|
||||
for t in transitions:
|
||||
self._join_test(t[0], t[1], stack)
|
||||
|
|
Loading…
Reference in New Issue