Browse Source

[9.0][FIX][mail_tracking] Control exception when mail_message was removed (#132)

pull/269/head
Antonio Espinosa 8 years ago
committed by Jairo Llopis
parent
commit
866bd3b6d0
  1. 2
      mail_tracking/models/mail_tracking_email.py

2
mail_tracking/models/mail_tracking_email.py

@ -225,6 +225,8 @@ class MailTrackingEmail(models.Model):
return email return email
def _message_partners_check(self, message, message_id): 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 mail_message = self.mail_message_id
partners = ( partners = (
mail_message.needaction_partner_ids | mail_message.partner_ids) mail_message.needaction_partner_ids | mail_message.partner_ids)

Loading…
Cancel
Save