[wf] return None, not empty list 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 21 Aug 2009 08:43:00 +0200
branch3.5
changeset 2944 3bd49b70f7f9
parent 2943 77622caef9bd
child 2945 f0ab83510477
[wf] return None, not empty list
entities/wfobjs.py
--- a/entities/wfobjs.py	Fri Aug 21 08:42:17 2009 +0200
+++ b/entities/wfobjs.py	Fri Aug 21 08:43:00 2009 +0200
@@ -23,7 +23,7 @@
     @property
     def initial(self):
         """return the initial state for this workflow"""
-        return self.initial_state and self.initial_state[0]
+        return self.initial_state and self.initial_state[0] or None
 
     def is_default_workflow_of(self, etype):
         """return True if this workflow is the default workflow for the given