From ca83cc2946ffd61511166f44f57b9850d417a254 Mon Sep 17 00:00:00 2001 From: Avery Lee Date: Mon, 20 Nov 2023 13:45:47 -0800 Subject: [PATCH] Case assignee check fails faster. --- src/dispatch/case/messaging.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dispatch/case/messaging.py b/src/dispatch/case/messaging.py index 8d53154fd8d9..ae9d54a02a15 100644 --- a/src/dispatch/case/messaging.py +++ b/src/dispatch/case/messaging.py @@ -68,6 +68,10 @@ def send_case_triage_reminder(case: Case, db_session: SessionLocal): log.warning("Case triage reminder message not sent. No conversation plugin enabled.") return + if not case.assignee: + log.warning("Case triage reminder message not sent. No assignee.") + return + items = [ { "name": case.name, @@ -77,10 +81,6 @@ def send_case_triage_reminder(case: Case, db_session: SessionLocal): } ] - if not case.assignee: - log.warning("Case triage reminder message not sent. No assignee.") - return - plugin.instance.send_direct( case.assignee.individual.email, message_text,