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

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 23 20:07:47 CEST 2010


Author: nicolas.dumazet
Date: Thu Sep 23 20:07:46 2010
New Revision: 38602

URL: http://svn.erp5.org?rev=38602&view=rev
Log:
unify attribute deletion

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=38602&r1=38601&r2=38602&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Thu Sep 23 20:07:46 2010
@@ -599,9 +599,7 @@ class BaseTemplateItem(Implicit, Persist
       #elif classname == 'SQL' and klass.__module__== 'Products.ZSQLMethods':
       #  attr_set.update(('_arg', 'template'))
       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:
-            delattr(obj, dict_name)
+        attr_set.update(('last_max_id_dict', 'last_id_dict'))
 
     for attr in obj.__dict__.keys():
       if attr in attr_set or attr.startswith('_cache_cookie_'):




More information about the Erp5-report mailing list