Commit 449db9b3 authored by Julien Muchembled's avatar Julien Muchembled

Fix possible 'dictionary changed size during iteration' error when a BT installs a property sheet

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41508 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bc7a4fd5
......@@ -937,7 +937,9 @@ class Base( CopyContainer,
portal_types = getToolByName(portal, 'portal_types', None)
generated_bid = set()
econtext = createExpressionContext(object=self, portal=portal)
for pid, ps in PropertySheet.__dict__.iteritems():
# Use 'items' instead of 'iteritems' because PropertySheet.__dict__ may
# be modified by another thread (that, for example, installs a BT).
for pid, ps in PropertySheet.__dict__.items():
if pid[0] != '_':
base_category_list = []
for cat in getattr(ps, '_categories', ()):
......
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