Commit 1f1c46dc authored by Jérome Perrin's avatar Jérome Perrin

fixup! Listbox: do not get stat values on brains by index when we can simply...

fixup! Listbox: do not get stat values on brains by index when we can simply get them by key (ie. column name)

Exception is now a key error
parent e2a955e7
...@@ -1837,10 +1837,7 @@ class ListBoxRenderer: ...@@ -1837,10 +1837,7 @@ class ListBoxRenderer:
stat_result = {} stat_result = {}
for index, (k, v) in enumerate(self.getSelectedColumnList()): for index, (k, v) in enumerate(self.getSelectedColumnList()):
try: stat_result[k] = stat_brain[0].get(k, '')
stat_result[k] = stat_brain[0][k]
except IndexError:
stat_result[k] = ''
stat_context = report_tree_obj.asContext(**stat_result) stat_context = report_tree_obj.asContext(**stat_result)
# XXX yo thinks that this code below is useless, so disabled. # XXX yo thinks that this code below is useless, so disabled.
......
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