From 300695de5c6454c6cc30dc41047af673cbf1e1ec Mon Sep 17 00:00:00 2001 From: vojkovic Date: Sat, 30 May 2026 17:23:03 +0000 Subject: [PATCH] [fix] crash when lock is omitted --- searx/settings_defaults.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index 40c68a029..c23ebd956 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -147,6 +147,8 @@ def apply_schema(settings: dict[str, t.Any], schema: dict[str, t.Any], path_list # Type Validation at runtime: # https://jcristharif.com/msgspec/structs.html#type-validation cfg_dict = settings.get(key) + if cfg_dict is None: + cfg_dict = {} cfg_json = msgspec.json.encode(cfg_dict) settings[key] = msgspec.json.decode(cfg_json, type=value) except msgspec.ValidationError as e: