[Erp5-report] r9297 - /erp5/trunk/products/ERP5Type/Base.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Aug 21 18:35:21 CEST 2006
Author: kevin
Date: Mon Aug 21 18:35:19 2006
New Revision: 9297
URL: http://svn.erp5.org?rev=9297&view=rev
Log:
Generic "hasSomething()" accessors test properties against None value, not against empty string.
Modified:
erp5/trunk/products/ERP5Type/Base.py
Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=9297&r1=9296&r2=9297&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py (original)
+++ erp5/trunk/products/ERP5Type/Base.py Mon Aug 21 18:35:19 2006
@@ -2210,11 +2210,11 @@
"""
current = self
# 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()
# First try to get a content layout
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()
current = current.getParentValue()
if not hasattr(current, 'getApplicableLayout'):
More information about the Erp5-report
mailing list