Skip to content

Commit

Permalink
LP #1061247: Fix ZMI properties edit form for properties named method.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Oct 21, 2012
1 parent e92a261 commit d08308f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions doc/CHANGES.rst
Expand Up @@ -18,6 +18,8 @@ http://docs.zope.org/zope2/releases/.
- repoze.tm2 = 1.0
- tempstorage = 2.12.2

- LP #1061247: Fix ZMI properties edit form for properties named `method`.

- LP #1058049: Fix support for zoperunner section in zope.conf.

- Explicitly close all databases on shutdown, which ensures `Data.fs.index`
Expand Down
11 changes: 7 additions & 4 deletions src/OFS/PropertyManager.py
Expand Up @@ -299,9 +299,9 @@ def manage_editProperties(self, REQUEST):
name = prop['id']
if 'w' in prop.get('mode', 'wd'):
if prop['type'] == 'multiple selection':
value = REQUEST.get(name, [])
value = REQUEST.form.get(name, [])
else:
value = REQUEST.get(name, '')
value = REQUEST.form.get(name, '')
self._updateProperty(name, value)
if REQUEST:
message = "Saved changes."
Expand All @@ -316,8 +316,11 @@ def manage_changeProperties(self, REQUEST=None, **kw):
name=value parameters
"""
if REQUEST is None:
props={}
else: props=REQUEST
props = {}
elif isinstance(REQUEST, dict):
props = REQUEST
else:
props = REQUEST.form
if kw:
for name, value in kw.items():
props[name]=value
Expand Down

0 comments on commit d08308f

Please sign in to comment.