[Erp5-report] r38599 nicolas.dumazet - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 23 19:24:20 CEST 2010


Author: nicolas.dumazet
Date: Thu Sep 23 19:24:19 2010
New Revision: 38599

URL: http://svn.erp5.org?rev=38599&view=rev
Log:
deleting an attribute is better than setting it to None: it's less clutter in XML

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=38599&r1=38598&r2=38599&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Thu Sep 23 19:24:19 2010
@@ -613,10 +613,10 @@ class BaseTemplateItem(Implicit, Persist
       else:
         # save result of automatic compilation
         obj._p_changed = 1
-    elif  interfaces.IIdGenerator.providedBy(obj):
+    elif interfaces.IIdGenerator.providedBy(obj):
       for dict_name in ('last_max_id_dict', 'last_id_dict'):
         if getattr(obj, dict_name, None) is not None:
-          setattr(obj, dict_name, None)
+          delattr(obj, dict_name)
     return obj
 
   def getTemplateTypeName(self):




More information about the Erp5-report mailing list