Commit e8ac8f65 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Do not attempt to go on, if no bt is installed.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20868 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5c505997
......@@ -84,7 +84,9 @@ def get_term_list(business_field, reference):\n
\n
def get_obj_and_reference_list(business_field):\n
result = []\n
# XXX this might be too simple: some business template include more than one skin folder\n
bt = portal_templates.getInstalledBusinessTemplate("erp5_%s" % business_field)\n
if bt is None: return result\n
for wf_id in bt.getTemplateWorkflowIdList():\n
wf = getattr(portal_workflow, wf_id)\n
if getattr(wf, "interactions", marker) is marker: # only way to make sure it is not an interaction workflow ?\n
......
......@@ -73,7 +73,9 @@ term_dict = {}\n
result = []\n
\n
for bt_id in template_list:\n
# XXX this might be too simple: some business template include more than one skin folder\n
bt = context.portal_templates.getInstalledBusinessTemplate(bt_id)\n
if bt is None: continue\n
if bt_id.startswith(prefix):\n
bt_id = bt_id[len(prefix):]\n
\n
......@@ -165,6 +167,7 @@ return result\n
<string>_getattr_</string>
<string>context</string>
<string>bt</string>
<string>None</string>
<string>_getitem_</string>
<string>len</string>
<string>wf_id</string>
......
229
\ No newline at end of file
232
\ No newline at end of file
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