fix(leaderboard): filter out 0xp users
Some checks are pending
Deploy Elmeg / deploy (push) Waiting to run
Some checks are pending
Deploy Elmeg / deploy (push) Waiting to run
This commit is contained in:
parent
ea06b6435b
commit
7a549e15ac
1 changed files with 1 additions and 0 deletions
|
|
@ -118,6 +118,7 @@ def get_active_users(limit: int = 10, session: Session = Depends(get_session)):
|
||||||
)
|
)
|
||||||
.join(User, User.id == Profile.user_id)
|
.join(User, User.id == Profile.user_id)
|
||||||
.join(Review, Review.user_id == User.id)
|
.join(Review, Review.user_id == User.id)
|
||||||
|
.where(User.xp > 0)
|
||||||
.group_by(Profile.id)
|
.group_by(Profile.id)
|
||||||
.order_by(desc("review_count"))
|
.order_by(desc("review_count"))
|
||||||
.limit(limit)
|
.limit(limit)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue