[wf] ensure fromstates given, allow to give an entity (avoid spotless error, we can iter on entities...)
--- 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