entities/wfobjs.py
branchstable
changeset 4644 021035b9a7ab
parent 4436 294e084f1263
child 4645 fd4e32f17211
equal deleted inserted replaced
4643:921737d2e3a8 4644:021035b9a7ab
   254 
   254 
   255 class Transition(BaseTransition):
   255 class Transition(BaseTransition):
   256     """customized class for Transition entities"""
   256     """customized class for Transition entities"""
   257     __regid__ = 'Transition'
   257     __regid__ = 'Transition'
   258 
   258 
   259     def destination(self):
   259     def destination(self, entity):
   260         return self.destination_state[0]
   260         try:
       
   261             return self.destination_state[0]
       
   262         except IndexError:
       
   263             return entity.latest_trinfo().previous_state
       
   264 
   261 
   265 
   262     def parent(self):
   266     def parent(self):
   263         return self.workflow
   267         return self.workflow
   264 
   268 
   265 
   269