From 5a91786131bcdc5eafdc886751c1a2236c75c77a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 20 Jun 2011 19:09:53 +0200 Subject: [PATCH] findFiles --- pandora/archive/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index ed89439..cc0672a 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -447,7 +447,8 @@ Positions response['data']['items'] = qs.count() elif 'positions' in query: #FIXME: this does not scale for larger results - qs = _order_query(query['qs'], query['sort']) + qs = models.File.objects.filter(item__in=query['qs']) + qs = _order_query(qs, query['sort']) response['data']['positions'] = {} ids = [j['itemId'] for j in qs.values('itemId')]