From 6f9e9676cf9bd401897d1592fd02f3edba27da97 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 1 Mar 2012 15:53:29 +0100 Subject: [PATCH] add additional sort conditions to clip query, fixes #631 --- pandora/clip/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora/clip/views.py b/pandora/clip/views.py index 5339b6b0..99f8dbd6 100644 --- a/pandora/clip/views.py +++ b/pandora/clip/views.py @@ -31,6 +31,10 @@ def parse_query(data, user): def order_query(qs, sort): order_by = [] + sort += [ + {'key': 'position', 'operator': '+'}, + {'key': 'text', 'operator': '-'} + ] for e in sort: operator = e['operator'] if operator != '-':