Skip to content

Commit

Permalink
[FIX] crm: check if email_from is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-filament committed Jun 6, 2024
1 parent 59cf062 commit 8b2ddb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/crm/models/crm_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ def _message_partner_info_from_emails(self, emails, link_mail=False):
name_from_email = self.partner_name or self.contact_name
emails_normalized = tools.email_normalize_all(email)
email_normalized = emails_normalized[0] if emails_normalized else False
if email.lower() == self.email_from.lower() or (email_normalized and self.email_normalized == email_normalized):
if (email and self.email_from and email.lower() == self.email_from.lower()) or (email_normalized and self.email_normalized == email_normalized):
partner_info['full_name'] = tools.formataddr((
name_from_email,
','.join(emails_normalized) if emails_normalized else email))
Expand Down

0 comments on commit 8b2ddb0

Please sign in to comment.