From 061b5e6d8a7ba06ac4082d40cf38233a5dad01bc Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 7 Jun 2026 18:33:54 +0000 Subject: [PATCH] Fix add_session prefilling game from last session When no game_id is provided, the session form should start with no game selected rather than defaulting to the last session's game. https://claude.ai/code/session_01BZHdra2YBPwS3umwsGrgUj --- games/views/session.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/games/views/session.py b/games/views/session.py index 782e074..cc25005 100644 --- a/games/views/session.py +++ b/games/views/session.py @@ -244,10 +244,6 @@ def _session_fields(form) -> SafeText: def add_session(request: HttpRequest, game_id: int = 0) -> HttpResponse: initial: dict[str, Any] = {"timestamp_start": timezone.now()} - last = Session.objects.last() - if last is not None: - initial["game"] = last.game - if request.method == "POST": form = SessionForm(request.POST or None, initial=initial) if form.is_valid():