From 7a7e0d6ae03a529bba3b620ad784a4f194f67e25 Mon Sep 17 00:00:00 2001 From: cmyui Date: Thu, 28 Mar 2024 18:49:21 -0400 Subject: [PATCH] Fix query selecting users count from db --- app/repositories/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/repositories/users.py b/app/repositories/users.py index b94d860f..67c67054 100644 --- a/app/repositories/users.py +++ b/app/repositories/users.py @@ -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: