[Erp5-report] r33752 yo - /erp5/trunk/products/ERP5Form/ProxyField.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Mar 16 11:26:12 CET 2010


Author: yo
Date: Tue Mar 16 11:26:11 2010
New Revision: 33752

URL: http://svn.erp5.org?rev=33752&view=rev
Log:
Have get_recursive_tales to raise a verbose exception when a template field may not be retrieved.

Modified:
    erp5/trunk/products/ERP5Form/ProxyField.py

Modified: erp5/trunk/products/ERP5Form/ProxyField.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ProxyField.py?rev=33752&r1=33751&r2=33752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ProxyField.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/ProxyField.py [utf8] Tue Mar 16 11:26:11 2010
@@ -552,6 +552,8 @@
       return self.get_tales(id)
     else:
       proxied_field = self.getTemplateField()
+      if proxied_field is None:
+        raise AttributeError('The proxy field %r cannot find a template field' % self)
       if proxied_field.__class__ == ProxyField:
         return proxied_field.get_recursive_tales(id)
       else:




More information about the Erp5-report mailing list