Commit 6bab850b authored by Sebastien Robin's avatar Sebastien Robin

do not use eval if it fails


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4874 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e3beb002
......@@ -498,7 +498,6 @@ class ListBoxWidget(Widget.Widget):
# First, grasp and intialize the variables we may need later
#
###############################################################
here = REQUEST['here']
reset = REQUEST.get('reset', 0)
form = field.aq_parent
......@@ -687,7 +686,12 @@ class ListBoxWidget(Widget.Widget):
if REQUEST.form.has_key(k):
params[k] = REQUEST.form[k]
elif not params.has_key(k):
# Probalby eval must be removed, we have tales
# expressions instead
try:
params[k] = eval(v)
except TypeError:
params[k] = v
# Allow overriding list_method, count_method and stat_method by params
if params.has_key('list_method_id'):
......@@ -1963,7 +1967,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setDomainRoot')">
<!-- End of Table Wrapping for Select Tree -->
</td></tr>
</table>""" % (select_tree_html,list_html)
LOG('Listbox render end call', 0, '')
return list_html
ListBoxWidgetInstance = ListBoxWidget()
......
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