anymail / django-anymail

Django email backends and webhooks for Amazon SES, Brevo (Sendinblue), MailerSend, Mailgun, Mailjet, Postmark, Postal, Resend, SendGrid, SparkPost, Unisender Go and more
https://anymail.dev
BSD 3-Clause "New" or "Revised" License
1.65k stars 125 forks source link

Mailgun webhooks: AttributeError 'NoneType' object has no attribute 'get' #361

Closed izimobil closed 5 months ago

izimobil commented 5 months ago

In certain cases delivery-status can be None in the event POST data sent to the webhook. Anymail does not handle this case and throws an AttributeError.

Request Method: | POST https://redacted.org/anymail/mailgun/tracking/ 3.2 AttributeError 'NoneType' object has no attribute 'get' /home/redacted/VirtualEnvs/redacted.org/lib/python3.9/site-packages/anymail/webhooks/mailgun.py, line 179, in esp_to_anymail_event

medmunds commented 5 months ago

(Fix released in Anymail 10.3)