Commit d08308f3 authored by Hanno Schlichting's avatar Hanno Schlichting

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

parent e92a261c
...@@ -18,6 +18,8 @@ http://docs.zope.org/zope2/releases/. ...@@ -18,6 +18,8 @@ http://docs.zope.org/zope2/releases/.
- repoze.tm2 = 1.0 - repoze.tm2 = 1.0
- tempstorage = 2.12.2 - 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. - LP #1058049: Fix support for zoperunner section in zope.conf.
- Explicitly close all databases on shutdown, which ensures `Data.fs.index` - Explicitly close all databases on shutdown, which ensures `Data.fs.index`
......
...@@ -299,9 +299,9 @@ class PropertyManager(Base, ElementWithAttributes): ...@@ -299,9 +299,9 @@ class PropertyManager(Base, ElementWithAttributes):
name = prop['id'] name = prop['id']
if 'w' in prop.get('mode', 'wd'): if 'w' in prop.get('mode', 'wd'):
if prop['type'] == 'multiple selection': if prop['type'] == 'multiple selection':
value = REQUEST.get(name, []) value = REQUEST.form.get(name, [])
else: else:
value = REQUEST.get(name, '') value = REQUEST.form.get(name, '')
self._updateProperty(name, value) self._updateProperty(name, value)
if REQUEST: if REQUEST:
message = "Saved changes." message = "Saved changes."
...@@ -316,8 +316,11 @@ class PropertyManager(Base, ElementWithAttributes): ...@@ -316,8 +316,11 @@ class PropertyManager(Base, ElementWithAttributes):
name=value parameters name=value parameters
""" """
if REQUEST is None: if REQUEST is None:
props={} props = {}
else: props=REQUEST elif isinstance(REQUEST, dict):
props = REQUEST
else:
props = REQUEST.form
if kw: if kw:
for name, value in kw.items(): for name, value in kw.items():
props[name]=value props[name]=value
......
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