From 42aa04140675362828a05f05dc6375568af6dd33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Fri, 8 Dec 2023 12:46:27 +0100 Subject: [PATCH] fix stored variant ids and streak ordering --- src/fetch_games.py | 2 +- src/render_site.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fetch_games.py b/src/fetch_games.py index ecd9ac2..f7be41f 100644 --- a/src/fetch_games.py +++ b/src/fetch_games.py @@ -96,7 +96,7 @@ def process_game_entry(game_json: Dict, username_dict: Dict, variant_ids: List[i return user_ids.append(user_id) - return GameInfo(game_id, num_players, 0, seed, score, num_turns, user_ids, normalized_usernames) + return GameInfo(game_id, num_players, var_id, seed, score, num_turns, user_ids, normalized_usernames) def fetch_games_for_all_players(): diff --git a/src/render_site.py b/src/render_site.py index 23e2e03..418d796 100644 --- a/src/render_site.py +++ b/src/render_site.py @@ -259,7 +259,7 @@ def get_streak_list(): " GROUP BY (user_accounts.user_id, player_name, maximum_streak, current_streak) " " ) AS streaks " # As a tiebreak, just sort by player name for now for determinancy - "ORDER BY maximum_streak, player_name", + "ORDER BY maximum_streak DESC, player_name", (", ", rating_type) ) for (player_name, user_accounts, max_streak, current_streak) in cur.fetchall():