Commit 44190dce authored by 's avatar

Fixed bug 1224: property sheet edit bug. manage_editProperties now

leaves existing properties that do not have explicit values in the
REQUEST alone rather than blindly giving them a null value.
parent 9e595533
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Property management""" """Property management"""
__version__='$Revision: 1.22 $'[11:-2] __version__='$Revision: 1.23 $'[11:-2]
import ExtensionClass, Globals import ExtensionClass, Globals
import ZDOM import ZDOM
...@@ -302,8 +302,9 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes): ...@@ -302,8 +302,9 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
"""Edit object properties via the web.""" """Edit object properties via the web."""
for prop in self._properties: for prop in self._properties:
name=prop['id'] name=prop['id']
value=REQUEST.get(name, '') if REQUEST.has_key(name):
self._setPropValue(name, value) value=REQUEST.get(name)
self._setPropValue(name, value)
return MessageDialog( return MessageDialog(
title ='Success!', title ='Success!',
message='Your changes have been saved', message='Your changes have been saved',
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Property sheets""" """Property sheets"""
__version__='$Revision: 1.45 $'[11:-2] __version__='$Revision: 1.46 $'[11:-2]
import time, string, App.Management, Globals import time, string, App.Management, Globals
from ZPublisher.Converters import type_converters from ZPublisher.Converters import type_converters
...@@ -428,8 +428,9 @@ class PropertySheet(Persistent, Implicit): ...@@ -428,8 +428,9 @@ class PropertySheet(Persistent, Implicit):
"""Edit object properties via the web.""" """Edit object properties via the web."""
for prop in self.propertyMap(): for prop in self.propertyMap():
name=prop['id'] name=prop['id']
value=REQUEST.get(name, '') if REQUEST.has_key(name):
self._updateProperty(name, value) value=REQUEST.get(name)
self._updateProperty(name, value)
return MessageDialog( return MessageDialog(
title ='Success!', title ='Success!',
message='Your changes have been saved', message='Your changes have been saved',
......
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