avoid duplicate users for or queries, fixes #2871

This commit is contained in:
j 2016-01-12 12:06:12 +05:30
parent e05774ed96
commit face7da3da

View file

@ -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