Commit 610aefeb authored by Yoshinori Okuji's avatar Yoshinori Okuji

Check that states in a workflow is not empty or None.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4444 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dced2079
...@@ -289,7 +289,7 @@ class ERP5Site ( CMFSite, FolderMixIn ): ...@@ -289,7 +289,7 @@ class ERP5Site ( CMFSite, FolderMixIn ):
def getStateList(group): def getStateList(group):
state_dict = {} state_dict = {}
for wf in self.portal_workflow.objectValues(): for wf in self.portal_workflow.objectValues():
if hasattr(wf, 'states'): if getattr(wf, 'states', None):
for state in wf.states.objectValues(): for state in wf.states.objectValues():
if group in getattr(state, 'type_list', ()): if group in getattr(state, 'type_list', ()):
state_dict[state.getId()] = None state_dict[state.getId()] = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment