[Zope3-dev] Deleting utilities in site management doesn't work
correct
jürgen Kartnaller
j.kartnaller at cable.vol.at
Wed Oct 5 17:00:36 EDT 2005
When more than one utility is selected for deleting in the site
management view, only the first selected utility is deleted.
The problem is that the content of regManager is changed inside the
while iteratating over it.
Here is the fix which works for me :
If this is applicable, can please someone check it into the trunk ?
The file is in zope.app.component.browser
-------------------------------------------------------------------
Index: tools.py
===================================================================
--- tools.py (revision 38746)
+++ tools.py (working copy)
@@ -192,7 +192,8 @@
tool = self.activeTool
regManager = self.context[tool.folder].registrationManager
names = self.request.form['selected']
- for reg in regManager.values():
+ values=[v for v in regManager.values()]
+ for reg in values:
if reg.provided.isOrExtends(tool.interface) and reg.name in
names:
component = reg.component
reg.status = interfaces.registration.InactiveStatus
-------------------------------------------------------------------
Jürgen
More information about the Zope3-dev
mailing list