chore(lint): combine nested if dans bookslm_routes (SIM102)
CI / lint (push) Successful in 36s
CI / security (push) Successful in 23s
CI / test (push) Successful in 48s
CI / build (push) Failing after 24s
CI / e2e (push) Skipped
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s

Fix final pour atteindre 'All checks passed!' sur ruff check backend/.
Le commit précédent avait raté ce fichier (modifié par --unsafe-fixes
mais non inclus dans le commit).
This commit is contained in:
2026-09-07 09:09:27 -04:00
parent 43f5b4a078
commit 1ef0a7ed82
+6 -7
View File
@@ -109,13 +109,12 @@ async def api_bookslm_chat(
try:
cfg_name = DEFAULT_PROVIDER
# Check if default provider is available
if cfg_name != "gemini" and cfg_name in PROVIDERS:
if not PROVIDERS[cfg_name].get("api_key"):
# Find first available provider
for pname, pcfg in PROVIDERS.items():
if pcfg.get("api_key") and pname != "gemini":
cfg_name = pname
break
if cfg_name != "gemini" and cfg_name in PROVIDERS and not PROVIDERS[cfg_name].get("api_key"):
# Find first available provider
for pname, pcfg in PROVIDERS.items():
if pcfg.get("api_key") and pname != "gemini":
cfg_name = pname
break
if cfg_name == "gemini" and PROVIDERS.get("gemini", {}).get("api_key"):
response = await _call_gemini(user_prompt, system_prompt, temperature=0.3, max_tokens=4096)