[Erp5-report] r29183 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Sep 25 15:09:50 CEST 2009


Author: romain
Date: Fri Sep 25 15:09:47 2009
New Revision: 29183

URL: http://svn.erp5.org?rev=29183&view=rev
Log:
Explicitely raise an error if a portal type is not found when business template should add new property on it.

Modified:
    erp5/trunk/products/ERP5/Document/BusinessTemplate.py

Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=29183&r1=29182&r2=29183&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Fri Sep 25 15:09:47 2009
@@ -1982,8 +1982,8 @@
           portal_id = key.split('/')[-1]
           portal_type = pt._getOb(portal_id)
         except AttributeError:
-          LOG("portal types not found : ", 100, portal_id)
-          continue
+          raise AttributeError, "Portal type '%s' not found while " \
+              "installing %s" % (portal_id, self.getTitle())
         property_list = self._objects.get(key, [])
         old_property_list = old_objects.get(key, ())
         object_property_list = getattr(portal_type, self.class_property, ())




More information about the Erp5-report mailing list