From ce92a75980983729857075d084fe5651a5b55295 Mon Sep 17 00:00:00 2001 From: Lars Meijers Date: Wed, 15 Nov 2023 10:15:17 +0100 Subject: [PATCH] fixed the burndown calculation ensure timestamp is used --- dojo/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dojo/utils.py b/dojo/utils.py index 19f1db975b8..2361ca8dd94 100644 --- a/dojo/utils.py +++ b/dojo/utils.py @@ -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 @@ -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