Skip to content

Commit

Permalink
Merge pull request #96 from cisagov/fix-fast-report-generation-constr…
Browse files Browse the repository at this point in the history
…aints

Fixed to allow report generation in the absence of risk score info for FAST
  • Loading branch information
karendm authored Oct 2, 2023
2 parents 458b535 + f7027d9 commit d600205
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ptportal/views/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,11 @@ def get_context_data(self, **kwargs):
uploaded_list = UploadedFinding.objects.all().order_by('assessment_type', 'severity', 'uploaded_finding_name')
cis_csc_objects = CIS_CSC.objects.all().order_by('CIS_ID')

if UploadedFinding.objects.filter(magnitude='').count() > 0 or UploadedFinding.objects.filter(likelihood__isnull=True).count() > 0:
context['incomplete_risk_score'] = True
if report.report_type == "RVA":
if UploadedFinding.objects.filter(magnitude='').count() > 0 or UploadedFinding.objects.filter(likelihood__isnull=True).count() > 0:
context['incomplete_risk_score'] = True
else:
context['incomplete_risk_score'] = False
else:
context['incomplete_risk_score'] = False

Expand Down

0 comments on commit d600205

Please sign in to comment.