From 3453f80e782affaef1817f32b9ebdd5e75257ff2 Mon Sep 17 00:00:00 2001 From: Romazes Date: Sat, 21 Sep 2024 00:38:53 +0300 Subject: [PATCH] feat: filter dict config by regex condition --- lean/models/json_module.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lean/models/json_module.py b/lean/models/json_module.py index 24aadf73..3833bb34 100644 --- a/lean/models/json_module.py +++ b/lean/models/json_module.py @@ -87,7 +87,11 @@ def _check_if_config_passes_filters(self, config: Configuration, all_for_platfor # skip, we want all configurations that match type and platform, for help continue target_value = self.get_config_value_from_name(condition._dependent_config_id) - if not target_value or not condition.check(target_value): + if not target_value: + return False + elif isinstance(target_value, dict): + return all(condition.check(value) for value in target_value.values()) + elif not condition.check(target_value): return False return True