From 77f0b3383b93927729cffac3417f5f7545d7a9a9 Mon Sep 17 00:00:00 2001 From: Ben Brown <9870007+brownben@users.noreply.github.com> Date: Sat, 13 Apr 2024 18:49:48 +0100 Subject: [PATCH] fix: don't show in league results unless you have atleast 1 point --- backend/src/routes/leagues.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/src/routes/leagues.py b/backend/src/routes/leagues.py index 890ce1b9..f7362ec5 100644 --- a/backend/src/routes/leagues.py +++ b/backend/src/routes/leagues.py @@ -153,7 +153,7 @@ async def delete_league( async def get_league_events( league_name: str = Path( title="League Name", - description="Name of the league to get the results for", + description="Name of the league", example="Sprintelope 2021", ), ) -> Iterable[EventWithLeagueDetailsAndUploadKey]: @@ -187,7 +187,7 @@ def generate_event_calendar_description(event: EventWithLeagueDetails) -> str: async def get_league_events_calendar( league_name: str = Path( title="League Name", - description="Name of the league to get the results for", + description="Name of the league", example="Sprintelope 2021", ), ) -> PlainTextResponse: @@ -323,6 +323,7 @@ async def get_league_results( result for result in league_results.values() if any([points is not None for points in result.points]) + and result.total_points > 0 ] results.sort( key=lambda x: x.total_points, @@ -343,7 +344,7 @@ async def get_league_results( async def get_league_classes( league_name: str = Path( title="League Name", - description="Name of the league ", + description="Name of the league", example="Sprintelope 2021", ), ) -> Iterable[LeagueClass]: