Commit 10e81d33 authored by Jérome Perrin's avatar Jérome Perrin

Make sure last_dict is not None before trying to add something inside

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19080 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c74065e7
......@@ -83,7 +83,7 @@ def order_line_list(line_list, current_structure, depth=0, index=0, last_dict=No
section_depth = listbox_line.getSectionDepth()\n
if listbox_line.isDataLine():\n
section_depth += 1\n
if section_depth == (depth +1):\n
if last_dict is None or section_depth == (depth +1):\n
last_dict = {\'line\':listbox_line, \'line_list\':[]}\n
current_structure[\'line_list\'].append(last_dict)\n
index += 1\n
......
119
\ No newline at end of file
120
\ 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