Commit 92e13bbb authored by Romain Courteaud's avatar Romain Courteaud

getWebSectionValueList should return nothing if no web section is visible.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26334 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dc584473
...@@ -220,9 +220,11 @@ class WebSite(WebSection): ...@@ -220,9 +220,11 @@ class WebSite(WebSection):
id='WebSite._getWebSectionUidList', id='WebSite._getWebSectionUidList',
cache_factory='erp5_content_medium') cache_factory='erp5_content_medium')
web_section_uid_list = _getWebSectionUidList(self)
if web_section_uid_list:
section_list = self.portal_domains.searchPredicateList(document, section_list = self.portal_domains.searchPredicateList(document,
portal_type='Web Section', portal_type='Web Section',
uid=_getWebSectionUidList(self)) uid=web_section_uid_list)
section_dict = {} section_dict = {}
...@@ -243,3 +245,5 @@ class WebSite(WebSection): ...@@ -243,3 +245,5 @@ class WebSite(WebSection):
section_list.sort(key=lambda x: x.getIntIndex()) section_list.sort(key=lambda x: x.getIntIndex())
return section_list return section_list
else:
return []
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