From 60800df7989eaa1e2d503649949591ac189433ae Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Thu, 18 Jul 2024 00:52:34 +0000 Subject: [PATCH] fix resolved emails not being sent --- api/tacticalrmm/alerts/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/tacticalrmm/alerts/models.py b/api/tacticalrmm/alerts/models.py index 8067096a..c28b6d75 100644 --- a/api/tacticalrmm/alerts/models.py +++ b/api/tacticalrmm/alerts/models.py @@ -589,6 +589,8 @@ class Alert(models.Model): core = CoreSettings.objects.first() # set variables + email_severities = None + text_severities = None email_on_resolved = False text_on_resolved = False resolved_email_task = None @@ -691,7 +693,7 @@ class Alert(models.Model): and not core.notify_on_warning_alerts ): pass - elif alert.severity not in email_severities: + elif email_severities and alert.severity not in email_severities: pass else: resolved_email_task.delay(pk=alert.pk) @@ -706,7 +708,7 @@ class Alert(models.Model): and not core.notify_on_warning_alerts ): pass - elif alert.severity not in text_severities: + elif text_severities and alert.severity not in text_severities: pass else: resolved_text_task.delay(pk=alert.pk)