mirror of
https://github.com/open-webui/computer.git
synced 2026-11-27 15:49:24 -05:00
refac
This commit is contained in:
1 parent
482f456688
commit
3e8235eaa4
2 files changed
+4
-1
No files matched your search
@@ -46,7 +46,7 @@
|
||||
.split(',')
|
||||
.map((m) => m.trim())
|
||||
.filter(Boolean)
|
||||
: [];
|
||||
: null;
|
||||
const name =
|
||||
formName.trim() ||
|
||||
(() => {
|
||||
|
||||
@@ -223,6 +223,9 @@ async def update_connection(conn_id: str, body: UpdateConnectionRequest, request
|
||||
conn["enabled"] = body.enabled
|
||||
if body.models is not None:
|
||||
conn.setdefault("data", {})["models"] = body.models
|
||||
elif "models" in body.model_fields_set:
|
||||
# Explicit null → clear whitelist, enable auto-discovery
|
||||
conn.get("data", {}).pop("models", None)
|
||||
|
||||
await _save_connections(connections)
|
||||
invalidate_model_cache(request.app.state)
|
||||
|
||||
Reference in new issue
Block a user