Commit 376834bb authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

call aq_parent's getWebSiteValue or getWebSectionValue only if it exists....

call aq_parent's getWebSiteValue or getWebSectionValue only if it exists. thanks to Jérôme and Ivan for notifying this issue.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28412 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 131bf188
...@@ -349,7 +349,11 @@ class FolderMixIn(ExtensionClass.Base): ...@@ -349,7 +349,11 @@ class FolderMixIn(ExtensionClass.Base):
specified case (eg. web_site_module/site/fr/web_page_module), we specified case (eg. web_site_module/site/fr/web_page_module), we
call aq_parent instead to reach the Web Site. call aq_parent instead to reach the Web Site.
""" """
return aq_parent(self).getWebSiteValue() getWebSiteValue = getattr(aq_parent(self), 'getWebSiteValue', None)
if getWebSiteValue is not None:
return getWebSiteValue()
else:
return None
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getWebSectionValue') 'getWebSectionValue')
...@@ -359,7 +363,11 @@ class FolderMixIn(ExtensionClass.Base): ...@@ -359,7 +363,11 @@ class FolderMixIn(ExtensionClass.Base):
specified case (eg. web_site_module/site/fr/section/web_page_module), specified case (eg. web_site_module/site/fr/section/web_page_module),
we call aq_parent instead to reach the Web Section. we call aq_parent instead to reach the Web Section.
""" """
return aq_parent(self).getWebSectionValue() getWebSectionValue = getattr(aq_parent(self), 'getWebSectionValue', None)
if getWebSectionValue is not None:
return getWebSectionValue()
else:
return None
BTREE_HANDLER = 1 BTREE_HANDLER = 1
HBTREE_HANDLER = 2 HBTREE_HANDLER = 2
......
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