diff mbox

[Branch,~linaro-validation/lava-server/trunk] Rev 389: fix check for whether the requested column sort is valid

Message ID 20120821014215.22278.73138.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Michael-Doyle Hudson Aug. 21, 2012, 1:42 a.m. UTC
------------------------------------------------------------
revno: 389
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Tue 2012-08-21 13:41:49 +1200
message:
  fix check for whether the requested column sort is valid
modified:
  lava/utils/data_tables/query.py


--
lp:lava-server
https://code.launchpad.net/~linaro-validation/lava-server/trunk

You are subscribed to branch lp:lava-server.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava/utils/data_tables/query.py'
--- lava/utils/data_tables/query.py	2012-01-17 01:24:32 +0000
+++ lava/utils/data_tables/query.py	2012-08-21 01:41:49 +0000
@@ -48,7 +48,7 @@ 
         self.iSortingCols = int(request.GET.get('iSortingCols', 0))
         for i in range(self.iSortingCols):
             column_index = int(request.GET.get('iSortCol_{0}'.format(i), 0))
-            sortable = request.GET.get('bSortable_{0}'.format(i), 'false') == 'true'
+            sortable = request.GET.get('bSortable_{0}'.format(column_index), 'false') == 'true'
             if sortable:
                 sorting_direction = request.GET.get('sSortDir_{0}'.format(i), 'asc')
                 self.sorting_columns.append((column_index, sorting_direction))