Commit ac8896f4 authored by wenjie.zheng's avatar wenjie.zheng

Workflow.py: use CachinMethod to execute getPortalTypeListForWorkflow; now...

Workflow.py: use CachinMethod to execute getPortalTypeListForWorkflow; now this part keeps indentical to the DCWorkflow.py.
parent 2ceb392f
......@@ -50,6 +50,7 @@ from Products.DCWorkflow.utils import Message as _
from Products.DCWorkflow.utils import modifyRolesForPermission
from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition as DCWorkflow
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Type.Globals import PersistentMapping
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
from Products.DCWorkflow.Expression import createExprContext
......@@ -351,7 +352,9 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
append(document.getTypeInfo().getId())
return result
portal_type_list = getPortalTypeListForWorkflow(self.id)
_getPortalTypeListForWorkflow = CachingMethod(getPortalTypeListForWorkflow,
id='_getPortalTypeListForWorkflow', cache_factory = 'erp5_ui_long')
portal_type_list = _getPortalTypeListForWorkflow(self.id)
if not portal_type_list:
return None
variable_match_dict = {}
......
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