Commit 097d0a30 authored by Andreas Jung's avatar Andreas Jung

Collector #907: delegating deletion of property

parent ef6bdbc8
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
############################################################################## ##############################################################################
"""Property management""" """Property management"""
__version__='$Revision: 1.51 $'[11:-2] __version__='$Revision: 1.52 $'[11:-2]
import ExtensionClass, Globals import ExtensionClass, Globals
import ZDOM import ZDOM
...@@ -199,7 +199,7 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes): ...@@ -199,7 +199,7 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
def _delProperty(self, id): def _delProperty(self, id):
if not self.hasProperty(id): if not self.hasProperty(id):
raise ValueError, 'The property %s does not exist' % escape(id) raise ValueError, 'The property %s does not exist' % escape(id)
delattr(self,id) self._delPropValue(id)
self._properties=tuple(filter(lambda i, n=id: i['id'] != n, self._properties=tuple(filter(lambda i, n=id: i['id'] != n,
self._properties)) self._properties))
...@@ -289,7 +289,8 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes): ...@@ -289,7 +289,8 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
self._updateProperty(name, value) self._updateProperty(name, value)
if REQUEST: if REQUEST:
message="Saved changes." message="Saved changes."
return self.manage_propertiesForm(self,REQUEST,manage_tabs_message=message) return self.manage_propertiesForm(self,REQUEST,
manage_tabs_message=message)
# Note - this is experimental, pending some community input. # Note - this is experimental, pending some community input.
......
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