Skip to content

Commit

Permalink
fix mitigated finding remaining sla days calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeaowens committed Jan 10, 2024
1 parent aab6ccf commit 970fa5c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dojo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2816,9 +2816,11 @@ def set_sla_expiration_date(self):

def sla_days_remaining(self):
if self.sla_expiration_date:
return (self.sla_expiration_date - get_current_date()).days
else:
None
if self.mitigated:
return (self.sla_expiration_date - self.mitigated.date()).days
else:
return (self.sla_expiration_date - get_current_date()).days
return None

def sla_deadline(self):
return self.sla_expiration_date
Expand Down

0 comments on commit 970fa5c

Please sign in to comment.