From 866bd3b6d09d9387006c133b0739f7bd9653092d Mon Sep 17 00:00:00 2001 From: Antonio Espinosa Date: Tue, 22 Nov 2016 11:30:55 +0100 Subject: [PATCH] [9.0][FIX][mail_tracking] Control exception when mail_message was removed (#132) --- mail_tracking/models/mail_tracking_email.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mail_tracking/models/mail_tracking_email.py b/mail_tracking/models/mail_tracking_email.py index a6c1f337..8a51112c 100644 --- a/mail_tracking/models/mail_tracking_email.py +++ b/mail_tracking/models/mail_tracking_email.py @@ -225,6 +225,8 @@ class MailTrackingEmail(models.Model): return email def _message_partners_check(self, message, message_id): + if not self.mail_message_id.exists(): # pragma: no cover + return True mail_message = self.mail_message_id partners = ( mail_message.needaction_partner_ids | mail_message.partner_ids)