Compare commits
2 Commits
05e30610e9
...
547894d8d0
| Author | SHA1 | Date | |
|---|---|---|---|
| 547894d8d0 | |||
| 061b5e6d8a |
@@ -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) ──
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user