Commit 4f842bb4 authored by Kevin Deldycke's avatar Kevin Deldycke

Generic "hasSomething()" accessors test properties against None value, not against empty string.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9297 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5701a19b
...@@ -2210,11 +2210,11 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -2210,11 +2210,11 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
""" """
current = self current = self
# First try to get a container layout # First try to get a container layout
if hasattr(current, 'getContainerLayout') and current.hasContainerLayout(): if hasattr(current, 'getContainerLayout') and current.getContainerLayout() not in ('', None):
return current.getContainerLayout() return current.getContainerLayout()
# First try to get a content layout # First try to get a content layout
while current is not None: while current is not None:
if hasattr(current, 'hasContentLayout') and current.hasContentLayout(): if hasattr(current, 'hasContentLayout') and current.getContentLayout() not in ('', None):
return current.getContentLayout() return current.getContentLayout()
current = current.getParentValue() current = current.getParentValue()
if not hasattr(current, 'getApplicableLayout'): if not hasattr(current, 'getApplicableLayout'):
......
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