avoid duplicate users for or queries, fixes #2871
This commit is contained in:
parent
e05774ed96
commit
face7da3da
1 changed files with 2 additions and 1 deletions
|
@ -102,11 +102,12 @@ class SessionDataManager(Manager):
|
||||||
|
|
||||||
#join query with operator
|
#join query with operator
|
||||||
qs = self.get_query_set()
|
qs = self.get_query_set()
|
||||||
|
|
||||||
query = data.get('query', {})
|
query = data.get('query', {})
|
||||||
conditions = parseConditions(query.get('conditions', []),
|
conditions = parseConditions(query.get('conditions', []),
|
||||||
query.get('operator', '&'),
|
query.get('operator', '&'),
|
||||||
user)
|
user)
|
||||||
if conditions:
|
if conditions:
|
||||||
qs = qs.filter(conditions)
|
qs = qs.filter(conditions)
|
||||||
|
qs = qs.distinct()
|
||||||
return qs
|
return qs
|
||||||
|
|
Loading…
Reference in a new issue