Skip to content

Commit

Permalink
feat: filter dict config by regex condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Sep 20, 2024
1 parent 2103f1b commit 3453f80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lean/models/json_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3453f80

Please sign in to comment.