[multi-sources] in ms config we don't have state_of (and probably others, but that's the one used until now...) 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 27 Aug 2009 16:58:20 +0200
branch3.5
changeset 3038 1261c3df0e5a
parent 3037 45de36c7d47c
child 3039 7d5a4d27d052
[multi-sources] in ms config we don't have state_of (and probably others, but that's the one used until now...)
entities/wfobjs.py
--- a/entities/wfobjs.py	Thu Aug 27 16:57:22 2009 +0200
+++ b/entities/wfobjs.py	Thu Aug 27 16:58:20 2009 +0200
@@ -303,7 +303,8 @@
 
     @property
     def workflow(self):
-        return self.state_of[0]
+        # take care, may be missing in multi-sources configuration
+        return self.state_of and self.state_of[0]
 
     def after_deletion_path(self):
         """return (path, parameters) which should be used as redirect