Commit 9bc7790d by Őry Máté

acl: fix get_objects_with_level returning duplicated results

parent 34c98135
...@@ -217,7 +217,7 @@ class AclBase(Model): ...@@ -217,7 +217,7 @@ class AclBase(Model):
clsfilter = Q(object_level_set__in=ols.all()) clsfilter = Q(object_level_set__in=ols.all())
if owner_also: if owner_also:
clsfilter |= Q(owner=user) clsfilter |= Q(owner=user)
return cls.objects.filter(clsfilter) return cls.objects.filter(clsfilter).distinct()
@classmethod @classmethod
def get_objects_with_group_level(cls, level, group): def get_objects_with_group_level(cls, level, group):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment