From dab85ad4fc04a75c14c52e2bbb0f1a18eb3c6e93 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 2 Oct 2011 17:39:34 +0200 Subject: [PATCH] return each place only once --- pandora/place/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora/place/views.py b/pandora/place/views.py index b78cbeed..71ef3e0a 100644 --- a/pandora/place/views.py +++ b/pandora/place/views.py @@ -225,6 +225,7 @@ Positions query = parse_query(data, request.user) qs = order_query(query['qs'], query['sort']) + qs = qs.distinct() if 'keys' in data: qs = qs[query['range'][0]:query['range'][1]] response['data']['items'] = [p.json(data['keys'], request.user) for p in qs]