From f5d3cfdad429a191e15f1224280815fd31b0af88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Mon, 4 Dec 2023 15:06:40 +0100 Subject: [PATCH] deterministic sort order --- src/render_site.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/render_site.py b/src/render_site.py index caeed18..10cba8a 100644 --- a/src/render_site.py +++ b/src/render_site.py @@ -106,7 +106,8 @@ def get_stat_lists(stat_type: str, order_type: str = 'DESC', precision: int = 0, " ON users.id = user_accounts.user_id " f" GROUP BY (user_accounts.user_id, player_name, {stat_type}) " " ) AS streaks " - f"ORDER BY value {order_type}", + # As a tiebreak, just sort by player name for now for determinancy + f"ORDER BY value {order_type}, player_name", (", ", default, rating_type) ) for (player_name, user_accounts, value) in cur.fetchall():