selectors.py
branchstable
changeset 6881 a473bf557456
parent 6871 b746dae3a004
child 6905 fe9fd048e64c
equal deleted inserted replaced
6880:4be32427b2b9 6881:a473bf557456
  1436     initializer.
  1436     initializer.
  1437     """
  1437     """
  1438     @lltrace
  1438     @lltrace
  1439     def __call__(self, cls, req, transition=None, **kwargs):
  1439     def __call__(self, cls, req, transition=None, **kwargs):
  1440         # XXX check this is a transition that apply to the object?
  1440         # XXX check this is a transition that apply to the object?
       
  1441         if transition is None:
       
  1442             treid = req.form.get('treid', None)
       
  1443             if treid:
       
  1444                 transition = req.entity_from_eid(treid)
  1441         if transition is not None and getattr(transition, 'name', None) in self.expected:
  1445         if transition is not None and getattr(transition, 'name', None) in self.expected:
  1442             return 1
  1446             return 1
  1443         return 0
  1447         return 0
  1444 
  1448 
  1445 
  1449