Skip to content

Commit

Permalink
resolve conditions recursively
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramon committed Oct 27, 2023
1 parent ea7fe6b commit bbe3e0e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pycfmodel/model/cf_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ def resolve(self, extra_params=None) -> "CFModel":
dict_value = self.dict()

conditions = dict_value.pop("Conditions", {})
resolved_conditions = {
key: _extended_bool(resolve(value, extended_parameters, self.Mappings, {}))
for key, value in conditions.items()
}
resolved_conditions = {}
for key, value in conditions.items():
resolved_conditions.update({
key: _extended_bool(resolve(value, extended_parameters, self.Mappings, resolved_conditions))
})

resources = dict_value.pop("Resources")
resolved_resources = {
Expand Down

0 comments on commit bbe3e0e

Please sign in to comment.