allow archive season filtering on leaderboard

This commit is contained in:
SowinskiBraeden committed 2026-06-27 14:21:55 -07:00
1 parent 0411a0d099
commit 42a9595966
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ DATA_PATH = BASE_DIR / "data" / "entries.csv"
DEFAULT_DATABASE_URL = f"sqlite:///{BASE_DIR / 'data' / 'boker-dev.sqlite3'}" DEFAULT_DATABASE_URL = f"sqlite:///{BASE_DIR / 'data' / 'boker-dev.sqlite3'}"
ELIGIBLE_MIN_SESSIONS = 3 ELIGIBLE_MIN_SESSIONS = 3
APP_VERSION = "2.5.19" APP_VERSION = "2.5.20"
def load_local_env(env_path: Path) -> None: def load_local_env(env_path: Path) -> None:
+3 -3
View File
@@ -324,7 +324,7 @@ def leaderboard(league_ref: str):
ordered_sessions = sorted(all_sessions, key=session_sort_key) ordered_sessions = sorted(all_sessions, key=session_sort_key)
# Season filter: restrict to sessions belonging to a specific season. # Season filter: restrict to sessions belonging to a specific season.
seasons = list_seasons_for_league(league.id) seasons = list_seasons_for_league(league.id, include_archived=True)
selected_season_id = request.args.get("season", "").strip() selected_season_id = request.args.get("season", "").strip()
selected_season = None selected_season = None
if selected_season_id: if selected_season_id:
@@ -868,7 +868,7 @@ def sessions(league_ref: str):
for sm in summaries for sm in summaries
if sm.session_id in ref_to_db_id if sm.session_id in ref_to_db_id
} }
seasons = list_seasons_for_league(league.id) seasons = list_seasons_for_league(league.id, include_archived=True)
season_map = {s.id: s for s in seasons} season_map = {s.id: s for s in seasons}
selected_season_id = request.args.get("season", "").strip() selected_season_id = request.args.get("season", "").strip()
@@ -1078,7 +1078,7 @@ def session_detail(league_ref: str, session_id: str):
summary = summaries[0] if summaries else empty_session_summary(session) summary = summaries[0] if summaries else empty_session_summary(session)
all_rows = list_all_event_rows_for_session(league.id, session.id) all_rows = list_all_event_rows_for_session(league.id, session.id)
seasons = list_seasons_for_league(league.id) seasons = list_seasons_for_league(league.id, include_archived=True)
return render_template( return render_template(
"league_session_detail.html", "league_session_detail.html",
league=league, league=league,