Skip to content

Commit

Permalink
fixed the burndown calculation ensure timestamp is used
Browse files Browse the repository at this point in the history
  • Loading branch information
lme-nca committed Nov 15, 2023
1 parent f18e2e2 commit ce92a75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dojo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2564,7 +2564,7 @@ def get_open_findings_burndown(product):
info_count += 1

if f.is_mitigated:
f_mitigated_date = f.mitigated.timestamp()
f_mitigated_date = datetime.combine(f.mitigated.timestamp(), datetime.min.time()).timestamp()
if f_mitigated_date >= d_start and f_mitigated_date < d_end:
if f.severity == 'Critical':
critical_count -= 1
Expand All @@ -2577,8 +2577,8 @@ def get_open_findings_burndown(product):
if f.severity == 'Info':
info_count -= 1

if f.risk_accepted:
f_risk_accepted = f.risk_acceptance.created.timestamp()
elif f.risk_accepted:
f_risk_accepted = datetime.combine(f.risk_accepted.created().timestamp(), datetime.min.time()).timestamp()
if f_risk_accepted >= d_start and f_risk_accepted < d_end:
if f.severity == 'Critical':
critical_count -= 1
Expand Down

0 comments on commit ce92a75

Please sign in to comment.