mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-10 13:26:13 +00:00
Update telemetry state for search model only if one is found, fix alt text for language setting
This commit is contained in:
@@ -109,7 +109,7 @@
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-title-row">
|
||||
<img class="card-icon" src="/static/assets/icons/web.svg" alt="Chat">
|
||||
<img class="card-icon" src="/static/assets/icons/web.svg" alt="Language">
|
||||
<h3 class="card-title">
|
||||
Language
|
||||
</h3>
|
||||
|
||||
@@ -343,6 +343,9 @@ async def update_search_model(
|
||||
|
||||
new_config = await adapters.aset_user_search_model(user, int(id))
|
||||
|
||||
if new_config is None:
|
||||
return {"status": "error", "message": "Model not found"}
|
||||
else:
|
||||
update_telemetry_state(
|
||||
request=request,
|
||||
telemetry_type="api",
|
||||
@@ -351,9 +354,6 @@ async def update_search_model(
|
||||
metadata={"search_model": new_config.setting.name},
|
||||
)
|
||||
|
||||
if new_config is None:
|
||||
return {"status": "error", "message": "Model not found"}
|
||||
|
||||
return {"status": "ok"}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user