Commit b63513ba authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Kazuhiko Shiozaki

Move more code inside cached function.

parent 6913475f
...@@ -470,8 +470,9 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False): ...@@ -470,8 +470,9 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
if worklist_dict: if worklist_dict:
portal = self.getPortalObject() portal = self.getPortalObject()
is_anonymous = portal.portal_membership.isAnonymousUser()
portal_url = portal.portal_url() portal_url = portal.portal_url()
def _getWorklistActionList():
is_anonymous = portal.portal_membership.isAnonymousUser()
portal_catalog = portal.portal_catalog portal_catalog = portal.portal_catalog
search_result = getattr(self, "Base_getCountFromWorklistTable", None) search_result = getattr(self, "Base_getCountFromWorklistTable", None)
use_cache = search_result is not None use_cache = search_result is not None
...@@ -482,7 +483,6 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False): ...@@ -482,7 +483,6 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
select_expression_prefix = 'count(*) as %s' % (COUNT_COLUMN_TITLE, ) select_expression_prefix = 'count(*) as %s' % (COUNT_COLUMN_TITLE, )
getSecurityUidDictAndRoleColumnDict = \ getSecurityUidDictAndRoleColumnDict = \
portal_catalog.getSecurityUidDictAndRoleColumnDict portal_catalog.getSecurityUidDictAndRoleColumnDict
def _getWorklistActionList():
worklist_result_dict = {} worklist_result_dict = {}
sql_catalog = portal_catalog.getSQLCatalog() sql_catalog = portal_catalog.getSQLCatalog()
# Get a list of dict of WorklistVariableMatchDict grouped by compatible # Get a list of dict of WorklistVariableMatchDict grouped by compatible
......
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