Skip to content

Commit c67e615

Browse files
authored
if severity not enforced do not notify (#10776)
* if severity notification not enforced do not notify * add comment on change
1 parent 22552f4 commit c67e615

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dojo/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,6 +1965,14 @@ def _create_notifications():
19651965
for finding in findings:
19661966
total_count += 1
19671967
sla_age = finding.sla_days_remaining()
1968+
1969+
# get the sla enforcement for the severity and, if the severity setting is not enforced, do not notify
1970+
# resolves an issue where notifications are always sent for the severity of SLA that is not enforced
1971+
severity, enforce = finding.get_sla_period()
1972+
if not enforce:
1973+
logger.debug(f"SLA is not enforced for Finding {finding.id} of {severity} severity, skipping notification.")
1974+
continue
1975+
19681976
# if SLA is set to 0 in settings, it's a null. And setting at 0 means no SLA apparently.
19691977
if sla_age is None:
19701978
sla_age = 0

0 commit comments

Comments
 (0)