From 107b11893e8f2d8de5c93cd9e12f273fd05bfe5c Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 14 Jan 2012 16:48:02 +0530 Subject: [PATCH] faster findPlaces query --- pandora/place/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/place/views.py b/pandora/place/views.py index dd278424..7eb73f71 100644 --- a/pandora/place/views.py +++ b/pandora/place/views.py @@ -251,7 +251,7 @@ Positions qs = order_query(query['qs'], query['sort']) qs = qs.distinct() if 'keys' in data: - qs = qs.select_related() + qs = qs.select_related('user__profile') 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: