Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(settings): use loguru brace formatting and clarify docstring in _filter_editable_settings (#4485)

LearningCircuit9b99141289ed
diff --git a/src/local_deep_research/web/routes/settings_routes.py b/src/local_deep_research/web/routes/settings_routes.py
index 893fc4e965..d4198bea02 100644
--- a/src/local_deep_research/web/routes/settings_routes.py
+++ b/src/local_deep_research/web/routes/settings_routes.py
@@ -92,8 +92,8 @@ settings_bp = Blueprint("settings", __name__, url_prefix="/settings")
def _filter_editable_settings(form_data: dict, db_session) -> dict:
"""Remove non-editable keys from *form_data* in place.
- Returns the ``{key: Setting}`` dict so callers can reuse it for
- further validation (e.g. egress-policy checks).
+ Returns a dict of *all* ``{key: Setting}`` records from the database
+ so callers can reuse it for further validation (e.g. egress-policy checks).
"""
all_db_settings = {
setting.key: setting for setting in db_session.query(Setting).all()
@@ -105,7 +105,7 @@ def _filter_editable_settings(form_data: dict, db_session) -> dict:
if key in all_db_settings and not all_db_settings[key].editable
]
if non_editable_keys:
- logger.warning(f"Skipping non-editable settings: {non_editable_keys}")
+ logger.warning("Skipping non-editable settings: {}", non_editable_keys)
for key in non_editable_keys:
del form_data[key]