faster findPlaces query
This commit is contained in:
parent
b7ca10808e
commit
107b11893e
1 changed files with 1 additions and 1 deletions
|
@ -251,7 +251,7 @@ Positions
|
||||||
qs = order_query(query['qs'], query['sort'])
|
qs = order_query(query['qs'], query['sort'])
|
||||||
qs = qs.distinct()
|
qs = qs.distinct()
|
||||||
if 'keys' in data:
|
if 'keys' in data:
|
||||||
qs = qs.select_related()
|
qs = qs.select_related('user__profile')
|
||||||
qs = qs[query['range'][0]:query['range'][1]]
|
qs = qs[query['range'][0]:query['range'][1]]
|
||||||
response['data']['items'] = [p.json(data['keys'], request.user) for p in qs]
|
response['data']['items'] = [p.json(data['keys'], request.user) for p in qs]
|
||||||
elif 'position' in query:
|
elif 'position' in query:
|
||||||
|
|
Loading…
Reference in a new issue