fix: isolate token_hex mock to wizard module and fix mypy annotation

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-23 10:01:07 +00:00
parent 4e1cd73338
commit 0188575c27
4 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ Setup wizard views for initial system configuration.
"""
import logging
import secrets
from secrets import token_hex
from fastapi import Depends, Form, Request
from fastapi.responses import RedirectResponse
@@ -104,7 +104,7 @@ async def setup_wizard_save(request: Request, step: int = Form(...), db: Session
if value and value.strip():
# Auto-generate session_secret if needed
if key == "session_secret" and value == "auto-generate":
value = secrets.token_hex(32)
value = token_hex(32)
logger.info("Auto-generated session secret")
# Save to database