diff --git a/css/leaderboards.css b/css/leaderboards.css index 9ea81a5..0326603 100644 --- a/css/leaderboards.css +++ b/css/leaderboards.css @@ -67,7 +67,7 @@ body { } .stat-description { display: inline-block; - width: 19em; + width: 13em; } .history-bullets { display: flex; diff --git a/src/render_site.py b/src/render_site.py index 332c10c..40410ea 100644 --- a/src/render_site.py +++ b/src/render_site.py @@ -2,8 +2,6 @@ import shutil from pathlib import Path from typing import Dict, List -import subprocess - import jinja2 import datetime import psycopg2.extras @@ -82,7 +80,7 @@ def get_rating_lists() -> Dict[int, List[PlayerEntry]]: rating_types = [utils.get_rating_type(x) for x in [False, True]] leaderboard = { utils.get_rating_type(x): [] - for x in [True, False] + for x in [False, True] } for rating_type in rating_types: cur.execute( @@ -168,9 +166,9 @@ def get_variant_rows() -> List[VariantRow]: " current_rating," " COUNT(games.id) AS games_played," " COUNT(games.id) FILTER (WHERE ratings.num_suits * 5 = games.score) AS games_won," - " SUM(game_statistics.num_bottom_deck_risks) AS total_bdr," - " SUM(game_statistics.num_crits_lost) AS total_crits_lost," - " SUM(games.num_turns) AS total_turns " + " COALESCE(SUM(game_statistics.num_bottom_deck_risks), 0) AS total_bdr," + " COALESCE(SUM(game_statistics.num_crits_lost), 0) AS total_crits_lost," + " COALESCE(SUM(games.num_turns), 0) AS total_turns " "FROM " " (" " SELECT DISTINCT ON (variants.id, variant_base_ratings.num_players)" diff --git a/src/utils.py b/src/utils.py index 4e5ea6c..975bee1 100644 --- a/src/utils.py +++ b/src/utils.py @@ -79,6 +79,6 @@ def get_rating_type(clue_starved: bool): def describe_rating_type(rating_type: int): if rating_type == 0: - return "Standard" + return "No Variant" elif rating_type == 1: return "Clue Starved" \ No newline at end of file