summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/views
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-03-12 08:44:12 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-04-21 10:39:12 +0800
commitf24310486bb97291350fa84f1e895635facb4155 (patch)
tree02701b328d468ff795b4ccc60adbdf3be6d8a3ac /apps/patchwork/views
parent26d551a1ee9e888c1656730c19414003124a4ec7 (diff)
downloadpatchwork-f24310486bb97291350fa84f1e895635facb4155.tar.bz2
patchwork-f24310486bb97291350fa84f1e895635facb4155.tar.xz
views/order: Apply default ordering as secondary
If we're ordering by a certain non-default field, then the ordering of patches with that same field will be arbitrary. This change applies the default as a secondary ordering, so we're not left with an arbitrary sub-order. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/views')
-rw-r--r--apps/patchwork/views/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/patchwork/views/__init__.py b/apps/patchwork/views/__init__.py
index a823388..4c63618 100644
--- a/apps/patchwork/views/__init__.py
+++ b/apps/patchwork/views/__init__.py
@@ -106,7 +106,7 @@ def generic_list(request, project, view,
patches = context.filters.apply(patches)
if not editable_order:
- patches = patches.order_by(order.query())
+ patches = order.apply(patches)
paginator = Paginator(request, patches)