diff --git a/llm_server/database/database.py b/llm_server/database/database.py index 327916b..5f00829 100644 --- a/llm_server/database/database.py +++ b/llm_server/database/database.py @@ -143,7 +143,7 @@ def sum_column(table_name, column_name): try: cursor.execute(f"SELECT SUM({column_name}) FROM {table_name}") result = cursor.fetchone() - return result[0] if result[0] else 0 + return result[0] if result else 0 finally: cursor.close()