From e48148bc4784de7e5aabdd68a365a6481357b511 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 14 Oct 2011 23:13:19 +0200 Subject: [PATCH] required for complex queries --- pandora/item/managers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora/item/managers.py b/pandora/item/managers.py index 50e686ce..72ba3c21 100644 --- a/pandora/item/managers.py +++ b/pandora/item/managers.py @@ -243,6 +243,7 @@ class ItemManager(Manager): conditions = parseConditions(data.get('query', {}).get('conditions', []), data.get('query', {}).get('operator', '&')) qs = qs.filter(conditions) + qs = qs.distinct() #anonymous can only see public items if user.is_anonymous():