Commit 782ef7a5 authored by Vincent Pelletier's avatar Vincent Pelletier

Add backward compatibility with former business template.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25039 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7237600b
...@@ -581,14 +581,21 @@ def WorkflowTool_refreshWorklistCache(self): ...@@ -581,14 +581,21 @@ def WorkflowTool_refreshWorklistCache(self):
worklist_dict[wf_id] = a worklist_dict[wf_id] = a
# End of duplicated code # End of duplicated code
if len(worklist_dict): if len(worklist_dict):
try: Base_zClearWorklistTable = getattr(self, 'Base_zClearWorklistTable', None)
self.Base_zClearWorklistTable() if Base_zClearWorklistTable is None:
except ProgrammingError, error_value: LOG('WorkflowTool', 100, 'Base_zClearWorklistTable cannot be found. ' \
import pdb; pdb.set_trace() 'Falling back to former refresh method. Please update ' \
# 1146 = table does not exist 'erp5_worklist_sql business template.')
if error_value[0] != 1146:
raise
self.Base_zCreateWorklistTable() self.Base_zCreateWorklistTable()
else:
try:
self.Base_zClearWorklistTable()
except ProgrammingError, error_value:
import pdb; pdb.set_trace()
# 1146 = table does not exist
if error_value[0] != 1146:
raise
self.Base_zCreateWorklistTable()
portal_catalog = getToolByName(self, 'portal_catalog') portal_catalog = getToolByName(self, 'portal_catalog')
search_result = portal_catalog.unrestrictedSearchResults search_result = portal_catalog.unrestrictedSearchResults
acceptable_key_dict = portal_catalog.getSQLCatalog().getColumnMap() acceptable_key_dict = portal_catalog.getSQLCatalog().getColumnMap()
......
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