Skip to content

Commit

Permalink
Fix query selecting users count from db
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Mar 28, 2024
1 parent 869d214 commit 7a7e0d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/repositories/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ async def fetch_count(
play_style: int | None = None,
) -> int:
"""Fetch the number of users in the database."""
select_stmt = select(func.count().label("count"))
select_stmt = select(func.count().label("count")).select_from(UsersTable)
if priv is not None:
select_stmt = select_stmt.where(UsersTable.priv == priv)
if country is not None:
Expand Down

0 comments on commit 7a7e0d6

Please sign in to comment.