changeset b4aaf747da38 in modules/party:default
details: https://hg.tryton.org/modules/party?cmd=changeset&node=b4aaf747da38
description:
Test if contact is set before reading it's language
issue10516
review352181002
diffstat:
ir.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 929a0e7d90ae -r b4aaf747da38 ir.py
--- a/ir.py Thu May 20 10:16:23 2021 +0200
+++ b/ir.py Tue Jun 29 11:59:30 2021 +0200
@@ -79,7 +79,7 @@
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