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

nobody at svn.erp5.org nobody at svn.erp5.org
Sun Jan 14 10:46:21 CET 2007


Author: jp
Date: Sun Jan 14 10:46:20 2007
New Revision: 12080

URL: http://svn.erp5.org?rev=12080&view=rev
Log:
Additional raise message to inform the user of the missing object.

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=12080&r1=12079&r2=12080&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py Sun Jan 14 10:46:20 2007
@@ -499,7 +499,10 @@
     p = context.getPortalObject()
     for relative_url in self._archive.keys():
       obj = p.unrestrictedTraverse(relative_url)
-      obj = obj._getCopy(context)
+      try:
+        obj = obj._getCopy(context)
+      except AttributeError:
+        raise AttributeError, "Could not find object '%s' during business template processing." % relative_url
       obj = self.removeProperties(obj)
       id_list = obj.objectIds()
       if hasattr(aq_base(obj), 'groups'):




More information about the Erp5-report mailing list