Test if contact is set before reading it's language
issue10516 review352181002 (grafted from b4aaf747da380f142c8ab2bd1fc686138280c229) --HG-- branch : 6.0
This commit is contained in:
1 parent
dc06deef10
commit
b1ef005a5d
1 file changed
+1
-1
@@ -79,7 +79,7 @@ class EmailTemplate(metaclass=PoolMeta):
|
||||
if isinstance(record, Party):
|
||||
usage = Transaction().context.get('usage')
|
||||
contact = record.contact_mechanism_get('email', usage=usage)
|
||||
if contact.language:
|
||||
if contact and contact.language:
|
||||
language = contact.language
|
||||
elif record.lang:
|
||||
language = record.lang
|
||||
|
||||
Reference in new issue
Block a user