Skip to content

Commit

Permalink
Fix compliance assessment donut chart values computation
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed May 7, 2024
1 parent 83836fb commit bd22d8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1357,13 +1357,16 @@ def donut_render(self) -> dict:
.filter(compliance_assessment=self)
.filter(requirement__assessable=True)
)
requirement_assessments = set()
if (
self.selected_implementation_groups
and len(self.selected_implementation_groups) > 0
):
for ig in self.selected_implementation_groups:
_requirement_assessments = _requirement_assessments.filter(
requirement__implementation_groups__icontains=ig
requirement_assessments.add(
_requirement_assessments.filter(
requirement__implementation_groups__icontains=ig
)
)
count = _requirement_assessments.count()
v = {
Expand Down

0 comments on commit bd22d8c

Please sign in to comment.