Skip to content

Commit

Permalink
[lib] add missing join condition to rewritten membership query
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjuhrich committed Sep 5, 2023
1 parent 0586a41 commit 1912fc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycroft/lib/membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def user_memberships_query(
p_granted = aliased(Property)
p_denied = aliased(Property)
memberships = (
memberships.join(group)
memberships.join(group, Membership.group_id == group.id)
.outerjoin(
p_granted, and_(p_granted.property_group_id == group.id, p_granted.granted)
)
Expand Down

0 comments on commit 1912fc1

Please sign in to comment.