Skip to content
Snippets Groups Projects
Commit 7365b60b authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Fix is_person_group_owner predicate

parent 5eb56aae
No related branches found
No related tags found
1 merge request!49Resolve "Add rules and permissions"
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment