Skip to content

Commit

Permalink
reorder if statement check
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Costello committed Dec 12, 2024
1 parent 45818f4 commit 04eb213
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corehq/ex-submodules/dimagi/utils/django/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_valid_recipients(recipients, domain=None, is_conditional_alert=False):
:return: list of recipient emails not marked as bounced
"""
from corehq.toggles import BLOCKED_DOMAIN_EMAIL_SENDERS
if domain and BLOCKED_DOMAIN_EMAIL_SENDERS.enabled(domain) and is_conditional_alert:
if is_conditional_alert and domain and BLOCKED_DOMAIN_EMAIL_SENDERS.enabled(domain):
# don't sent email if domain is blocked
metrics_gauge('commcare.bounced_email', len(recipients), tags={
'email_domain': domain,
Expand Down

0 comments on commit 04eb213

Please sign in to comment.