diff mbox

[Branch,~linaro-validation/lava-server/trunk] Rev 395: if a table is queryset backed but not ajax enabled, render all the data

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

Commit Message

Michael-Doyle Hudson Sept. 20, 2012, 8:57 p.m. UTC
------------------------------------------------------------
revno: 395
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Fri 2012-09-21 08:56:49 +1200
message:
  if a table is queryset backed but not ajax enabled, render all the data
modified:
  lava/utils/data_tables/tables.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/tables.py'
--- lava/utils/data_tables/tables.py	2012-08-18 00:06:05 +0000
+++ lava/utils/data_tables/tables.py	2012-09-20 20:56:49 +0000
@@ -177,7 +177,10 @@ 
         display_length = self.datatable_opts.get('iDisplayLength', 10)
         if getattr(self.data, 'list', None) is not None:
             del self.data.list
-        self.data.queryset = sorted_queryset[:display_length]
+        if self.source:
+            self.data.queryset = sorted_queryset[:display_length]
+        else:
+            self.data.queryset = sorted_queryset
 
     @property
     def full_length(self):