entities/wfobjs.py
branchstable
changeset 4403 53f5d52085b4
parent 4212 ab6573088b4a
child 4436 294e084f1263
equal deleted inserted replaced
4402:360c532070f5 4403:53f5d52085b4
   487         assert self.current_workflow
   487         assert self.current_workflow
   488         if hasattr(statename, 'eid'):
   488         if hasattr(statename, 'eid'):
   489             stateeid = statename.eid
   489             stateeid = statename.eid
   490         else:
   490         else:
   491             if not isinstance(statename, basestring):
   491             if not isinstance(statename, basestring):
   492                 warn('give a state name')
   492                 warn('[3.5] give a state name', DeprecationWarning)
   493                 state = self.current_workflow.state_by_eid(statename)
   493                 state = self.current_workflow.state_by_eid(statename)
   494             else:
   494             else:
   495                 state = self.current_workflow.state_by_name(statename)
   495                 state = self.current_workflow.state_by_name(statename)
   496             if state is None:
   496             if state is None:
   497                 raise WorkflowException('not a %s state: %s' % (self.id,
   497                 raise WorkflowException('not a %s state: %s' % (self.id,