Added graph and table to document
This commit is contained in:
@@ -37,16 +37,17 @@ def create_document_for_organization(confirmation_email):
|
||||
|
||||
selected_controls = get_controls_for_risk(risk ,organization=organization)
|
||||
|
||||
for control_id, weight in selected_controls:
|
||||
for control_id, weight, likelihood in selected_controls:
|
||||
control = Control.objects.filter(id=control_id).first()
|
||||
if control:
|
||||
DocumentRiskControl.objects.create(
|
||||
document=document,
|
||||
risk=risk,
|
||||
control=control,
|
||||
weight=weight
|
||||
weight=weight,
|
||||
likelihood=likelihood
|
||||
)
|
||||
controls_content += f" - Control: {control.name} (Impact Weight: {weight}/10)\n"
|
||||
controls_content += f" - Control: {control.name} (Impact Weight: {weight}/10) (Likelihood: {likelihood}/10)\n"
|
||||
|
||||
controls_content += "\n"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user