Skip to content

Commit

Permalink
Merge pull request #796 from intuitem/hotfix_audit_actionplan_broken
Browse files Browse the repository at this point in the history
fix regression on audit's action plan
  • Loading branch information
ab-smith authored Sep 5, 2024
2 parents e92814f + 72b2040 commit bbef85b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,11 +1421,30 @@ def action_plan(self, request, pk):
compliance_assessment_object.get_requirement_assessments()
)
applied_controls = [
{**model_to_dict(applied_control), "id": applied_control.id}
{
"id": applied_control.id,
"name": applied_control.name,
"description": applied_control.description,
"status": applied_control.status,
"category": applied_control.category,
"csf_function": applied_control.csf_function,
"eta": applied_control.eta,
"expiry_date": applied_control.expiry_date,
"link": applied_control.link,
"effort": applied_control.effort,
"owners": [
{
"id": owner.id,
"email": owner.email,
}
for owner in applied_control.owner.all()
],
}
for applied_control in AppliedControl.objects.filter(
requirement_assessments__in=requirement_assessments_objects
).distinct()
]

for applied_control in applied_controls:
applied_control["requirements_count"] = (
RequirementAssessment.objects.filter(
Expand Down

0 comments on commit bbef85b

Please sign in to comment.