From 3cfe3a2234019b5b8fffd8bef0c87827a17e0257 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 a6c1f33..8a51112 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)