changeset 1424cc4854b6 in modules/party:6.0
details: https://hg.tryton.org/modules/party?cmd=changeset&node=1424cc4854b6
description:
Test if contact is set before reading it's language
issue10516
review352181002
(grafted from b4aaf747da380f142c8ab2bd1fc686138280c229)
diffstat:
ir.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r f86d096cc633 -r 1424cc4854b6 ir.py
--- a/ir.py Thu Jun 17 21:34:05 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