From e7a859ad0aee93b2a65ea8c2d5da84eacebc4a1a Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Tue, 14 Oct 2025 19:48:46 +0300 Subject: [PATCH] Fixes: 1) Ensure `get_parameters` handles missing configuration keys gracefully by adding a check for `None` values; Extra: Update `cache.get` default value in `get_parameters` method for better safety. --- core/utils/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/utils/__init__.py b/core/utils/__init__.py index 8357c26d..596b0f55 100644 --- a/core/utils/__init__.py +++ b/core/utils/__init__.py @@ -139,10 +139,12 @@ def get_project_parameters() -> Any: configuration source, formats their keys to lowercase, and then stores them in the cache for a limited period. """ - parameters = cache.get("parameters") + parameters = cache.get("parameters", {}) if not parameters: for key in EXPOSABLE_KEYS: + if not getattr(config, key): + continue parameters[key.lower()] = getattr(config, key) cache.set("parameters", parameters, 60 * 60)