diff --git a/mail_notification_email_template/models/mail_notification.py b/mail_notification_email_template/models/mail_notification.py index c6e20ec0..0083b7fa 100644 --- a/mail_notification_email_template/models/mail_notification.py +++ b/mail_notification_email_template/models/mail_notification.py @@ -65,5 +65,5 @@ class MailNotification(models.Model): }), this.partner_id ) - for a in etree.HTML(link_html).xpath('//a[@href]'): + for a in etree.HTML(link_html or '').xpath('//a[@href]'): this.record_access_link = a.get('href')