Commit 5086081b authored by Nicolas Dumazet's avatar Nicolas Dumazet

unify attribute deletion


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38602 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent befb65f2
...@@ -599,9 +599,7 @@ class BaseTemplateItem(Implicit, Persistent): ...@@ -599,9 +599,7 @@ class BaseTemplateItem(Implicit, Persistent):
#elif classname == 'SQL' and klass.__module__== 'Products.ZSQLMethods': #elif classname == 'SQL' and klass.__module__== 'Products.ZSQLMethods':
# attr_set.update(('_arg', 'template')) # attr_set.update(('_arg', 'template'))
elif interfaces.IIdGenerator.providedBy(obj): elif interfaces.IIdGenerator.providedBy(obj):
for dict_name in ('last_max_id_dict', 'last_id_dict'): attr_set.update(('last_max_id_dict', 'last_id_dict'))
if getattr(obj, dict_name, None) is not None:
delattr(obj, dict_name)
for attr in obj.__dict__.keys(): for attr in obj.__dict__.keys():
if attr in attr_set or attr.startswith('_cache_cookie_'): if attr in attr_set or attr.startswith('_cache_cookie_'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment