Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmelveilleux committed Sep 17, 2024
1 parent 4be346a commit c2ec44b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/chef/sample_app_util/zap_file_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def _convert_metadata_to_hashable_digest(metadata_input: Sequence[Dict[str, Endp
cluster_obj = endpoint_obj[cluster_type][cluster_id]

# Replace attribute names
attribute_obj = cluster_obj["attributes"]
attribute_keys = list(cluster_obj["attributes"])
attribute_obj = cluster_obj.get("attributes", [])
attribute_keys = list(attribute_obj)
for attribute_key in attribute_keys:
attribute_id = _get_id(attribute_key)
attribute_obj[attribute_id] = attribute_obj.pop(
Expand Down Expand Up @@ -252,7 +252,8 @@ def generate_metadata(
else:
cluster_obj: ClusterType = {"attributes": {}}

for attribute in cluster["attributes"]:
attributes = cluster.get("attributes", [])
for attribute in attributes:
attribute_allowed = (
attribute_allow_list is None or str(attribute["code"]) in attribute_allow_list)
if attribute["included"] and attribute_allowed:
Expand Down

0 comments on commit c2ec44b

Please sign in to comment.