entities/wfobjs.py
branchstable
changeset 4644 021035b9a7ab
parent 4436 294e084f1263
child 4645 fd4e32f17211
--- a/entities/wfobjs.py	Fri Feb 19 09:34:14 2010 +0100
+++ b/entities/wfobjs.py	Fri Feb 19 09:36:26 2010 +0100
@@ -256,8 +256,12 @@
     """customized class for Transition entities"""
     __regid__ = 'Transition'
 
-    def destination(self):
-        return self.destination_state[0]
+    def destination(self, entity):
+        try:
+            return self.destination_state[0]
+        except IndexError:
+            return entity.latest_trinfo().previous_state
+
 
     def parent(self):
         return self.workflow