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,6 +165,9 @@ def parseCondition(condition, user, owner=None):
else: else:
q = Q(id__in=l.items.all()) q = Q(id__in=l.items.all())
if exclude: if exclude:
if isinstance(q, list):
q = [~x for x in q]
else:
q = ~q q = ~q
else: else:
q = Q(id=0) q = Q(id=0)