Commit 36c5f8de authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

ERP5Site.py: deploy correct universal methods.

parent 4db022b0
...@@ -760,7 +760,9 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin): ...@@ -760,7 +760,9 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
def getStateList(group): def getStateList(group):
state_dict = {} state_dict = {}
for wf in self.portal_workflow.objectValues(): for wf in self.portal_workflow.objectValues():
for state in wf.getStateList(): state_list = wf.getStateValueList()
for state_id in wf.getStateValueList():
state = state_list[state_id]
if group in getattr(state, 'type_list', ()): if group in getattr(state, 'type_list', ()):
state_dict[state.getReference()] = None state_dict[state.getReference()] = None
return tuple(state_dict.keys()) return tuple(state_dict.keys())
...@@ -1282,8 +1284,10 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin): ...@@ -1282,8 +1284,10 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
def getStateList(): def getStateList():
state_dict = {} state_dict = {}
for wf in self.portal_workflow.objectValues(): for wf in self.portal_workflow.objectValues():
if wf.getVariableList() and wf.getStateVariable() == 'simulation_state': if wf.getVariableValueList() and wf.getStateVariable() == 'simulation_state':
for state in wf.getStateList(): state_list = wf.getStateValueList()
for state_id in state_list:
state = state_list[state_id]
if getattr(state, 'type_list', None): if getattr(state, 'type_list', None):
state_dict[state.getReference()] = None state_dict[state.getReference()] = None
return tuple(sorted(state_dict.keys())) return tuple(sorted(state_dict.keys()))
......
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