Skip to content

Commit

Permalink
If the transactional_id is None do nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
acasajus committed Mar 4, 2024
1 parent 565f6dc commit a7d4bd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions email_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,11 @@ def handle_transactional_bounce(
envelope: Envelope, msg, rcpt_to, transactional_id=None
):
LOG.d("handle transactional bounce sent to %s", rcpt_to)
if transactional_id is None:
LOG.i(
f"No transactional record for {envelope.mail_from} -> {envelope.rcpt_tos}"
)
return

transactional = TransactionalEmail.get(transactional_id)
# a transaction might have been deleted in delete_logs()
Expand Down

0 comments on commit a7d4bd1

Please sign in to comment.