Skip to content

Commit

Permalink
Move dev logging inside loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jwhitlock committed Oct 15, 2024
1 parent c74a6de commit 3cf598c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions emails/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1839,15 +1839,17 @@ def _handle_complaint(message_json: AWS_SNSMessageJSON) -> HttpResponse:

_disable_masks_for_complaint(message_json, user)

if flag_is_active_in_task("developer_mode", user):
# MPP-3932: We need more information to match complaints to masks
dev_action = DeveloperModeAction(mask_id="unknown", action="log")
_log_dev_notification(
"_handle_complaint: MPP-3932", dev_action, message_json
)

if not complaint_data:
# Data when there are no identified recipients
complaint_data = [{"user_match": "no_recipients", "relay_action": "no_action"}]

if flag_is_active_in_task("developer_mode", user):
# MPP-3932: We need more information to match complaints to masks
dev_action = DeveloperModeAction(mask_id="unknown", action="log")
_log_dev_notification("_handle_complaint: MPP-3932", dev_action, message_json)

for data in complaint_data:
tags = {
"complaint_subtype": subtype or "none",
Expand Down

0 comments on commit 3cf598c

Please sign in to comment.