Commit 898caf11 authored by Jérome Perrin's avatar Jérome Perrin

Do not assume the path always exists in the domain tree (eg. the

category has been deleted in the meanwhile)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5980 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c5388b15
...@@ -882,7 +882,9 @@ class ListBoxWidget(Widget.Widget): ...@@ -882,7 +882,9 @@ class ListBoxWidget(Widget.Widget):
base_category = domain.split('/')[0] base_category = domain.split('/')[0]
if portal_categories is not None: if portal_categories is not None:
if base_category in portal_categories.objectIds(): if base_category in portal_categories.objectIds():
root = root_dict[base_category] = portal_categories.restrictedTraverse(domain) root = portal_categories.restrictedTraverse(domain, None)
if root is not None :
root_dict[base_category] = root
if root is None and portal_domains is not None: if root is None and portal_domains is not None:
if base_category in portal_domains.objectIds(): if base_category in portal_domains.objectIds():
base_domain = portal_domains.getDomainByPath(domain) base_domain = portal_domains.getDomainByPath(domain)
......
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