fix(leaderboard): missing filter condition for user score

This commit is contained in:
MingxuanGame
2025-08-02 01:56:00 +00:00
parent 0b68bdc0c1
commit 884a3f1cc2

View File

@@ -328,6 +328,10 @@ async def get_leaderboard(
self_query = (
select(BestScore)
.where(BestScore.user_id == user.id)
.where(
col(BestScore.beatmap_id) == beatmap,
col(BestScore.gamemode) == mode,
)
.order_by(col(BestScore.total_score).desc())
.limit(1)
)