[workflow] fix potential destination for go back transition stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 19 Feb 2010 10:12:33 +0100
branchstable
changeset 4647 6d7589b4ae6f
parent 4646 322c3dd96dd5
child 4648 cf3b35545602
[workflow] fix potential destination for go back transition
entities/wfobjs.py
--- a/entities/wfobjs.py	Fri Feb 19 10:04:24 2010 +0100
+++ b/entities/wfobjs.py	Fri Feb 19 10:12:33 2010 +0100
@@ -270,8 +270,10 @@
         try:
             yield self.destination_state[0]
         except IndexError:
-            for state in self.reverse_allowed_transition:
-                yield state
+            for incomingstate in self.reverse_allowed_transition:
+                for tr in incomingstate.reverse_destination_state:
+                    for previousstate in tr.reverse_allowed_transition:
+                        yield previousstate
 
     def parent(self):
         return self.workflow