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):
worklist_dict[wf_id] = a
# End of duplicated code
if len(worklist_dict):
try:
self.Base_zClearWorklistTable()
except ProgrammingError, error_value:
import pdb; pdb.set_trace()
# 1146 = table does not exist
if error_value[0] != 1146:
raise
Base_zClearWorklistTable = getattr(self, 'Base_zClearWorklistTable', None)
if Base_zClearWorklistTable is None:
LOG('WorkflowTool', 100, 'Base_zClearWorklistTable cannot be found. ' \
'Falling back to former refresh method. Please update ' \
'erp5_worklist_sql business template.')
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')
search_result = portal_catalog.unrestrictedSearchResults
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