# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1238170211 -3600 # Node ID a33deae7c6a2149992c38d975f8cb497d2b38283 # Parent 62afd820d3ae3c2eead567576b62028fcb5b76b4 oops, this method doesn't belong anymore to entity class diff -r 62afd820d3ae -r a33deae7c6a2 web/form.py --- a/web/form.py Fri Mar 27 17:09:43 2009 +0100 +++ b/web/form.py Fri Mar 27 17:10:11 2009 +0100 @@ -561,15 +561,16 @@ relation's object entities (i.e. self is the subject) according to initial_state, state_of and next_state relation """ - if not self.has_eid() or not self.in_state: + entity = self.edited_entity + if not entity.has_eid() or not entity.in_state: # get the initial state rql = 'Any S where S state_of ET, ET name %(etype)s, ET initial_state S' - rset = self.req.execute(rql, {'etype': str(self.e_schema)}) + rset = self.req.execute(rql, {'etype': str(entity.e_schema)}) if rset: return [(rset.get_entity(0, 0).view('combobox'), rset[0][0])] return [] results = [] - for tr in self.in_state[0].transitions(self): + for tr in entity.in_state[0].transitions(entity): state = tr.destination_state[0] results.append((state.view('combobox'), state.eid)) return sorted(results)