Skip to content

Commit

Permalink
Use AppliedControlReadSerializer to serialize action plan controls
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Dec 4, 2024
1 parent 09d652e commit d1b87be
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1988,26 +1988,7 @@ def action_plan(self, request, pk):
)
)
applied_controls = [
{
"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,
"cost": applied_control.cost,
"owners": [
{
"id": owner.id,
"email": owner.email,
}
for owner in applied_control.owner.all()
],
}
AppliedControlReadSerializer(applied_control).data
for applied_control in AppliedControl.objects.filter(
requirement_assessments__in=requirement_assessments_objects
).distinct()
Expand Down

0 comments on commit d1b87be

Please sign in to comment.