Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3693,7 +3693,7 @@ def action_plan_excel(self, request, pk):
"ETA",
"Expiry date",
"Effort",
"Impact",
"Control impact",
"Cost",
"Assigned to",
"Covered scenarios",
Expand All @@ -3712,7 +3712,7 @@ def action_plan_excel(self, request, pk):
item.get("eta"),
item.get("expiry_date"),
item.get("effort"),
item.get("impact"),
item.get("control_impact"),
item.get("annual_cost"),
"\n".join([ra.get("str") for ra in item.get("owner")]),
"\n".join([ra.get("str") for ra in item.get("risk_scenarios")]),
Expand Down Expand Up @@ -4687,7 +4687,10 @@ def _extract_cost_field(control, *path):
"expiry_date": {"source": "expiry_date", "label": "expiry_date"},
"priority": {"source": "priority", "label": "priority"},
"effort": {"source": "get_effort_display", "label": "effort"},
"impact": {"source": "get_control_impact_display", "label": "impact"},
"control_impact": {
"source": "get_control_impact_display",
"label": "control_impact",
},
"cost_currency": {
"source": "cost",
"label": "cost_currency",
Expand Down Expand Up @@ -6299,7 +6302,7 @@ def update(self, request, *args, **kwargs):
else:
return super().update(request, *args, **kwargs)

@action(detail=False, name="Get acceptances to review")
@action(detail=False, name="Get ac ceptances to review")
def to_review(self, request):
acceptances = acceptances_to_review(request.user)

Expand Down Expand Up @@ -10632,7 +10635,7 @@ def action_plan_csv(self, request, pk):
"ETA",
"Expiry date",
"Effort",
"Impact",
"Control impact",
"Cost",
"Covered requirements",
]
Expand All @@ -10650,7 +10653,7 @@ def action_plan_csv(self, request, pk):
item.get("eta"),
item.get("expiry_date"),
item.get("effort"),
item.get("impact"),
item.get("control_impact"),
item.get("annual_cost"),
"\n".join(
[ra.get("str") for ra in item.get("requirement_assessments")]
Expand Down Expand Up @@ -10680,7 +10683,6 @@ def action_plan_xlsx(self, request, pk):
serializer = ComplianceAssessmentActionPlanSerializer(
queryset, many=True, context={"pk": pk}
)

entries = []
for item in serializer.data:
entry = {
Expand All @@ -10693,7 +10695,7 @@ def action_plan_xlsx(self, request, pk):
"eta": item.get("eta"),
"expiry_date": item.get("expiry_date"),
"effort": item.get("effort"),
"impact": item.get("impact"),
"control_impact": item.get("control_impact"),
"cost": item.get("annual_cost"),
"covered_requirements": "\n".join(
[ra.get("str") for ra in item.get("requirement_assessments")]
Expand Down
1 change: 0 additions & 1 deletion tools/convert_v1_to_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ def build_converted_workbook(input_path: str) -> Workbook:
if src_ws is not None:
copy_sheet_dimensions(src_ws, ws_out)
for r_idx, row in enumerate(rows, 1):
# print(f"coucou {r_idx}")
for c_idx, cell in enumerate(row, 1):
if isinstance(cell, Cell):
new_cell = ws_out.cell(row=r_idx, column=c_idx, value=cell.value)
Expand Down
Loading