From 156be256daa38dd0ccac066b00d578107d684313 Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 26 Feb 2024 15:43:04 -0500 Subject: [PATCH] get description for non mappable capabilities that have pages created for them --- src/mappings_explorer/site_builder.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mappings_explorer/site_builder.py b/src/mappings_explorer/site_builder.py index c5fdb109..76b7032c 100644 --- a/src/mappings_explorer/site_builder.py +++ b/src/mappings_explorer/site_builder.py @@ -410,7 +410,15 @@ def parse_capability_groups( } ) if project.id == "nist" or project.id == "cve": - for capability in project.capabilities: + # if the project has non mappable comments and we are therefore building the + # capability page even though it is non_mappable, get non_mappable capabilities' + # descriptions as well + capabilities_to_get_description = ( + project.capabilities + if not project.has_non_mappable_comments + else project.capabilities.extend(project.non_mappables) + ) + for capability in capabilities_to_get_description: get_description_for_capability(capability, project, project_version) if project.id == "aws" or project.id == "gcp" or project.id == "azure": get_security_stack_descriptions(project=project)