Skip to content

Commit

Permalink
Use bitwise or to get player permissions from groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekuruu committed Dec 24, 2023
1 parent de37575 commit 1534ec0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/repositories/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_player_permissions(
user_id: int,
session: Session | None = None
) -> int:
return session.query(func.sum(DBGroup.bancho_permissions)) \
return session.query(func.bit_or(DBGroup.bancho_permissions)) \
.join(DBGroupEntry) \
.filter(DBGroupEntry.user_id == user_id) \
.scalar() or 0

0 comments on commit 1534ec0

Please sign in to comment.