fix not in smart list queries

This commit is contained in:
j 2019-12-18 16:44:09 +02:00
parent 30ceb79f46
commit 4d2dff3afc

View file

@ -165,7 +165,10 @@ def parseCondition(condition, user, owner=None):
else:
q = Q(id__in=l.items.all())
if exclude:
q = ~q
if isinstance(q, list):
q = [~x for x in q]
else:
q = ~q
else:
q = Q(id=0)
return q