Commit ff4fa076 authored by Sebastien Robin's avatar Sebastien Robin

2008-10-06 Seb

* When displaying the last result of an alarm, sort the result in order
to see directly important results.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24033 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3d8d318e
......@@ -63,10 +63,14 @@ if active_process is None:\n
else:\n
active_process = context.getPortalObject().restrictedTraverse(active_process)\n
\n
result_list = []\n
\n
if active_process is not None:\n
return active_process.getResultList()\n
result_list = [x for x in active_process.getResultList()]\n
# High severity will be displayed first\n
result_list.sort(key=lambda x: -x.severity)\n
\n
return []\n
return result_list\n
</string> </value>
</item>
<item>
......@@ -108,6 +112,11 @@ return []\n
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>result_list</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>x</string>
</tuple>
</value>
</item>
......
973
\ No newline at end of file
976
\ 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