From 71a0a82aee70533204028a2c3ce450c26ec49fb2 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 15 May 2020 19:25:07 +0200 Subject: [PATCH] not in collection --- pandora/document/managers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/document/managers.py b/pandora/document/managers.py index fa0cd64a..c3b19f08 100644 --- a/pandora/document/managers.py +++ b/pandora/document/managers.py @@ -132,6 +132,8 @@ def buildCondition(k, op, v, user, exclude=False, owner=None): q = Q(id__in=l.documents.all()) else: q = Q(id=0) + if exclude: + q = ~q return q elif key_config.get('fulltext'): qs = models.Document.find_fulltext_ids(v)