findFiles

This commit is contained in:
j 2011-06-20 19:09:53 +02:00
parent 9ce590157a
commit 09464ba805

View file

@ -447,7 +447,8 @@ Positions
response['data']['items'] = qs.count() response['data']['items'] = qs.count()
elif 'positions' in query: elif 'positions' in query:
#FIXME: this does not scale for larger results #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'] = {} response['data']['positions'] = {}
ids = [j['itemId'] for j in qs.values('itemId')] ids = [j['itemId'] for j in qs.values('itemId')]