Compare commits

..

2 Commits

Author SHA1 Message Date
Claude 547894d8d0 Fix SearchSelect not showing selected label in single-select search box
Django CI/CD / test (push) Successful in 45s
Django CI/CD / build-and-push (push) Successful in 1m19s
The search_value was computed but never applied as a value attribute
on the search input element.

https://claude.ai/code/session_01BZHdra2YBPwS3umwsGrgUj
2026-06-07 20:52:56 +02:00
Claude 061b5e6d8a 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
2026-06-07 20:52:56 +02:00
2 changed files with 2 additions and 4 deletions
+2
View File
@@ -142,6 +142,8 @@ def SearchSelect(
]
if autofocus:
search_attrs.append(("autofocus", ""))
if search_value:
search_attrs.append(("value", search_value))
search = Component(tag_name="input", attributes=search_attrs)
# ── Options panel (pre-rendered only when there is no search_url) ──
-4
View File
@@ -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():