diff --git a/pandora/place/managers.py b/pandora/place/managers.py index ad824591..75d59b1d 100644 --- a/pandora/place/managers.py +++ b/pandora/place/managers.py @@ -141,4 +141,5 @@ class PlaceManager(Manager): user) if conditions: qs = qs.filter(conditions) + qs = qs.distinct() return qs diff --git a/pandora/place/views.py b/pandora/place/views.py index 9b9ba72f..0b4c105a 100644 --- a/pandora/place/views.py +++ b/pandora/place/views.py @@ -239,7 +239,6 @@ def findPlaces(request, data): qs = order_query(query['qs'], query['sort']) qs = qs.distinct() if 'keys' in data: - 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: