From 7365b60b5b9d9f2014db79a9da3a328095b1f3c6 Mon Sep 17 00:00:00 2001 From: Hangzhi Yu <hangzhi@protonmail.com> Date: Sat, 18 Jul 2020 01:18:37 +0200 Subject: [PATCH] Fix is_person_group_owner predicate --- aleksis/apps/alsijil/util/predicates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aleksis/apps/alsijil/util/predicates.py b/aleksis/apps/alsijil/util/predicates.py index af229770c..e7b9bca60 100644 --- a/aleksis/apps/alsijil/util/predicates.py +++ b/aleksis/apps/alsijil/util/predicates.py @@ -68,7 +68,7 @@ def is_person_group_owner(user: User, obj: Person) -> bool: Checks whether the person linked to the user is the owner of any group of the given person. """ - return obj.filter(member_of__owners=user.person).exists() + return obj.member_of.filter(owners=user.person).exists() @predicate -- GitLab