This commit is contained in:
j 2011-10-09 13:49:21 +00:00
parent a4d67e44f6
commit dd6d015fc0
3 changed files with 3 additions and 3 deletions

View file

@ -171,7 +171,7 @@ Positions
qs = query['qs'].distinct()
if 'keys' in data:
qs = qs[query['range'][0]:query['range'][1]]
qs = qs.select_realed()
qs = qs.select_related()
response['data']['items'] = [p.json(request.user) for p in qs]
elif 'position' in query:
ids = [i.get_id() for i in qs]

View file

@ -249,7 +249,7 @@ Positions
if 'accessed' in _p:
qs = qs.annotate(a=Max('accessed__access'))
if 'viewed' in _p or 'popularity' in _p or 'accessed' in _p:
qs = qs.select_realed()
qs = qs.select_related()
response['data']['items'] = [only_p_sums(m) for m in qs]
else:
response['data']['items'] = [only_p(m['json']) for m in qs.values('json')]

View file

@ -246,7 +246,7 @@ Positions
qs = order_query(query['qs'], query['sort'])
qs = qs.distinct()
if 'keys' in data:
qs = qs.select_realed()
qs = qs.select_related()
qs = qs[query['range'][0]:query['range'][1]]
response['data']['items'] = [p.json(data['keys'], request.user) for p in qs]
elif 'position' in query: