Commit 8f46318a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

For backward compatibility, we should handle the case when item['choice'] is not a list.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24493 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fc2e7f50
No related merge requests found
...@@ -62,7 +62,10 @@ bt_dict = {}\n ...@@ -62,7 +62,10 @@ bt_dict = {}\n
object_to_update = {}\n object_to_update = {}\n
for item in listbox:\n for item in listbox:\n
bt_id, object_id = item[\'listbox_key\'].split(\'|\')\n bt_id, object_id = item[\'listbox_key\'].split(\'|\')\n
bt_dict.setdefault(bt_id, dict())[object_id] = item[\'choice\'][0]\n try:\n
bt_dict.setdefault(bt_id, dict())[object_id] = item[\'choice\'][0]\n
except IndexError:\n
bt_dict.setdefault(bt_id, dict())[object_id] = item[\'choice\']\n
\n \n
bt_title_list = []\n bt_title_list = []\n
for bt_id in bt_id_list:\n for bt_id in bt_id_list:\n
......
1011 1012
\ 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