# HG changeset patch # User Sylvain Thénault # Date 1251217565 -7200 # Node ID 5082dec70ed8541a33c1ff6a78fab0ae31df52f0 # Parent d8f2e53702be2c3b5aac904086dbc445f3c2794b [wf] ensure fromstates given, allow to give an entity (avoid spotless error, we can iter on entities...) diff -r d8f2e53702be -r 5082dec70ed8 entities/wfobjs.py --- a/entities/wfobjs.py Tue Aug 25 18:24:54 2009 +0200 +++ b/entities/wfobjs.py Tue Aug 25 18:26:05 2009 +0200 @@ -111,6 +111,9 @@ self.req.execute('SET T transition_of WF ' 'WHERE T eid %(t)s, WF eid %(wf)s', {'t': tr.eid, 'wf': self.eid}, ('t', 'wf')) + assert fromstates, fromstates + if not isinstance(fromstates, (tuple, list)): + fromstates = (fromstates,) for state in fromstates: if hasattr(state, 'eid'): state = state.eid