[Erp5-report] r42021 nicolas.dumazet - /erp5/trunk/products/ERP5Type/ERP5Type.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jan 5 11:27:34 CET 2011


Author: nicolas.dumazet
Date: Wed Jan  5 11:27:33 2011
New Revision: 42021

URL: http://svn.erp5.org?rev=42021&view=rev
Log:
be wiser if a property is missing. We can live with a wrong icon

Modified:
    erp5/trunk/products/ERP5Type/ERP5Type.py

Modified: erp5/trunk/products/ERP5Type/ERP5Type.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/ERP5Type.py?rev=42021&r1=42020&r2=42021&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/ERP5Type.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/ERP5Type.py [utf8] Wed Jan  5 11:27:33 2011
@@ -598,7 +598,12 @@ class ERP5TypeInformation(XMLObject,
       return self.objectValues(meta_type='ERP5 Action Information')
 
     def getIcon(self):
-      return self.getTypeIcon()
+      try:
+        return self.getTypeIcon()
+      except AttributeError:
+        # do not fail if the property is missing: getTypeIcon is used in the ZMI
+        # and we always want to display the ZMI no matter what
+        return ''
 
     def getTypeInfo(self, *args):
       if args:



More information about the Erp5-report mailing list