From 4d2dff3afc5cb7d1fdb3b607fa873cff1cfc4bc2 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 18 Dec 2019 16:44:09 +0200 Subject: [PATCH] fix not in smart list queries --- pandora/item/managers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora/item/managers.py b/pandora/item/managers.py index cd185441..be409e5f 100644 --- a/pandora/item/managers.py +++ b/pandora/item/managers.py @@ -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