diff --git a/app/routers/games.py b/app/routers/games.py index c811379..1f7b6fd 100644 --- a/app/routers/games.py +++ b/app/routers/games.py @@ -404,7 +404,7 @@ async def game_summary(game_id: str, request: Request, user: dict = Depends(get_ playing_handicaps = {p["id"]: p.get("playing_handicap") for p in players} computed = _strokes_per_hole(players, holes, hole_stroke_indices) strokes_per_hole = {p["id"]: p["strokes_allocation"] or computed.get(p["id"], {}) for p in players} - has_stroke_index = bool(hole_stroke_indices) + has_stroke_index = bool(hole_stroke_indices) or any(strokes_per_hole.values()) skins_won, skins_hole_results, unclaimed, money_won, unclaimed_money = None, None, 0, None, 0.0 skin_value = game["skin_value"] @@ -464,7 +464,7 @@ async def game_page(game_id: str, request: Request, user: dict = Depends(get_cur computed = _strokes_per_hole(players, holes, hole_stroke_indices) strokes_per_hole = {p["id"]: p["strokes_allocation"] or computed.get(p["id"], {}) for p in players} - has_stroke_index = bool(hole_stroke_indices) + has_stroke_index = bool(hole_stroke_indices) or any(strokes_per_hole.values()) return templates.TemplateResponse("games/game.html", { "request": request, "user": user, "game": dict(game),