Commit 87273d80 authored by Aurel's avatar Aurel

2006-09-14 Aurel

* fix removeUnpickableObject in Base_callDialogMethod to take listbox into account

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9898 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 47e1c43e
...@@ -88,6 +88,11 @@ def removeUnpickableObjectsFromDict(request_form):\n ...@@ -88,6 +88,11 @@ def removeUnpickableObjectsFromDict(request_form):\n
"""\n """\n
cleaned_dict = request_form.copy()\n cleaned_dict = request_form.copy()\n
for k, v in cleaned_dict.items():\n for k, v in cleaned_dict.items():\n
if k == \'listbox\':\n
new_list = []\n
for line in v:\n
new_list.append(removeUnpickableObjectsFromDict(line))\n
cleaned_dict[k] = tuple(new_list)\n
if v in (None, \'\') or hasattr(v, \'read\'):\n if v in (None, \'\') or hasattr(v, \'read\'):\n
del cleaned_dict[k]\n del cleaned_dict[k]\n
return cleaned_dict\n return cleaned_dict\n
...@@ -205,7 +210,6 @@ if len(listbox_id_list):\n ...@@ -205,7 +210,6 @@ if len(listbox_id_list):\n
listbox_line_list.append(listbox_line)\n listbox_line_list.append(listbox_line)\n
listbox_line_list = tuple(listbox_line_list)\n listbox_line_list = tuple(listbox_line_list)\n
request_form[listbox_id] = listbox_line_list\n request_form[listbox_id] = listbox_line_list\n
\n
if enable_pickle or (form.update_action != \'\'):\n if enable_pickle or (form.update_action != \'\'):\n
request_form_cleaned = removeUnpickableObjectsFromDict(request_form)\n request_form_cleaned = removeUnpickableObjectsFromDict(request_form)\n
request_form[\'pickle_string\'] = context.portal_selections.getPickle(**request_form_cleaned)\n request_form[\'pickle_string\'] = context.portal_selections.getPickle(**request_form_cleaned)\n
...@@ -285,6 +289,12 @@ return context.REQUEST.RESPONSE.redirect(redirect_url)\n ...@@ -285,6 +289,12 @@ return context.REQUEST.RESPONSE.redirect(redirect_url)\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>dialog_method, dialog_id, dialog_category=\'\', enable_pickle=0, **kw</string> </value> <value> <string>dialog_method, dialog_id, dialog_category=\'\', enable_pickle=0, **kw</string> </value>
......
2006-09-14 Aurel
* fix removeUnpickableObject in Base_callDialogMethod to take listbox into account
2006-09-13 Kevin 2006-09-13 Kevin
* Fix developper mode rendering bug. * Fix developper mode rendering bug.
* erp5.js is needed in web mode by admin toolbox which display context_box_render. * erp5.js is needed in web mode by admin toolbox which display context_box_render.
......
179 181
\ No newline at end of file \ No newline at end of file
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