If the transactional_id is None do nothing

This commit is contained in:
Adrià Casajús 2024-03-04 17:47:06 +01:00
parent 565f6dc142
commit a7d4bd15a7
No known key found for this signature in database
GPG key ID: F0033226A5AFC9B9

View file

@ -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()