[Mpuls-commits] r4726 - base/trunk/mpulsweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Feb 28 15:53:21 CET 2011


Author: torsten
Date: 2011-02-28 15:53:21 +0100 (Mon, 28 Feb 2011)
New Revision: 4726

Modified:
   base/trunk/mpulsweb/templates/casemanagement/caselist.mako
Log:
* mpulsweb/templates/casemanagement/caselist.mako: Issue1533: Fixed
	issue with sorting params when showing caselist in delete-user helper.


Modified: base/trunk/mpulsweb/templates/casemanagement/caselist.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/caselist.mako	2011-02-28 13:46:18 UTC (rev 4725)
+++ base/trunk/mpulsweb/templates/casemanagement/caselist.mako	2011-02-28 14:53:21 UTC (rev 4726)
@@ -41,8 +41,15 @@
 
 <%def name="build_list_headers()">
   <%
-    sort_field = session['CASE_OVERVIEW_SEARCHOPTIONS'].get('sort_field')
-    sort_order = session['CASE_OVERVIEW_SEARCHOPTIONS'].get('sort_order')
+    # Normally CASE_OVERVIEW_SEARCHOPTIONS should contain at least the default
+    # ordering fields when showing the case-overview (Set in
+    # case_overview-controller). But as this template is included in other
+    # use-cases too this is not always true. In theses cases be more error
+    # tolerant and fallback to no (system default = id) sorting,
+    # which should be ok in theses cases.
+    s = session.get('CASE_OVERVIEW_SEARCHOPTIONS', {})
+    sort_field = s.get('sort_field')
+    sort_order = s.get('sort_order')
   %>
   % if g.mpuls_config.is_enabled('case-module', 'casebundle'):
     <th class="table_header_h table_checkbox">&nbsp;</th>



More information about the Mpuls-commits mailing list