Skip to content

Commit

Permalink
fix: don't show in league results unless you have atleast 1 point
Browse files Browse the repository at this point in the history
  • Loading branch information
brownben committed Apr 13, 2024
1 parent 8a827b6 commit 77f0b33
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/src/routes/leagues.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand All @@ -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]:
Expand Down

0 comments on commit 77f0b33

Please sign in to comment.