From 6fd8d2aef3a92c22ae384e2bbb00bcd045f01d5a Mon Sep 17 00:00:00 2001 From: j Date: Wed, 8 Nov 2017 18:00:30 +0100 Subject: [PATCH] fix query for documents rightslevel --- pandora/document/managers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandora/document/managers.py b/pandora/document/managers.py index 06ce3df52..db7ce3bff 100644 --- a/pandora/document/managers.py +++ b/pandora/document/managers.py @@ -75,6 +75,11 @@ def buildCondition(k, op, v, user, exclude=False, owner=None): if exclude: q = ~Q(id__in=models.Document.objects.filter(q)) return q + elif k == 'rightslevel': + q = Q(rightslevel=v) + if exclude: + q = ~Q(rightslevel=v) + return q elif k == 'groups': if op == '==' and v == '$my': if not owner: