Commit 8b718b40 authored by Jérome Perrin's avatar Jérome Perrin

don't override dict builtin



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15656 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 323560c2
...@@ -658,9 +658,9 @@ class ERP5Form(ZMIForm, ZopePageTemplate): ...@@ -658,9 +658,9 @@ class ERP5Form(ZMIForm, ZopePageTemplate):
from Products.Formulator.MethodField import Method from Products.Formulator.MethodField import Method
from Products.Formulator.TALESField import TALESMethod from Products.Formulator.TALESField import TALESMethod
def copy(dict): def copy(_dict):
new_dict = {} new_dict = {}
for key, value in dict.items(): for key, value in _dict.items():
if value=='': if value=='':
continue continue
if type(value) is Method: if type(value) is Method:
...@@ -669,7 +669,7 @@ class ERP5Form(ZMIForm, ZopePageTemplate): ...@@ -669,7 +669,7 @@ class ERP5Form(ZMIForm, ZopePageTemplate):
value = TALESMethod(value._text) value = TALESMethod(value._text)
elif not isinstance(value, (str, unicode, int, long, bool, elif not isinstance(value, (str, unicode, int, long, bool,
list, tuple, dict)): list, tuple, dict)):
raise ValueError, str(value) raise ValueError, repr(value)
new_dict[key] = value new_dict[key] = value
return new_dict return new_dict
......
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