From face7da3da4d4e4cb5c8e5a733b919fce82cfeca Mon Sep 17 00:00:00 2001 From: j Date: Tue, 12 Jan 2016 12:06:12 +0530 Subject: [PATCH] avoid duplicate users for or queries, fixes #2871 --- pandora/user/managers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora/user/managers.py b/pandora/user/managers.py index f09238b64..4c2a4d8ae 100644 --- a/pandora/user/managers.py +++ b/pandora/user/managers.py @@ -102,11 +102,12 @@ class SessionDataManager(Manager): #join query with operator qs = self.get_query_set() - + query = data.get('query', {}) conditions = parseConditions(query.get('conditions', []), query.get('operator', '&'), user) if conditions: qs = qs.filter(conditions) + qs = qs.distinct() return qs