# HG changeset patch # User Charles Hébert # Date 1295884766 -3600 # Node ID a473bf557456324f8d4b1613400c2bc11175c336 # Parent 4be32427b2b9ba4186884376926f41438d9d8eaf [selector] update `match_transition` selector to match form & as well as form view. diff -r 4be32427b2b9 -r a473bf557456 selectors.py --- a/selectors.py Mon Jan 24 11:39:53 2011 +0100 +++ b/selectors.py Mon Jan 24 16:59:26 2011 +0100 @@ -1438,6 +1438,10 @@ @lltrace def __call__(self, cls, req, transition=None, **kwargs): # XXX check this is a transition that apply to the object? + if transition is None: + treid = req.form.get('treid', None) + if treid: + transition = req.entity_from_eid(treid) if transition is not None and getattr(transition, 'name', None) in self.expected: return 1 return 0