changeset 6a1bc2cb9c63 in modules/account_statement_coda:4.8
details:
https://hg.tryton.org/modules/account_statement_coda?cmd=changeset;node=6a1bc2cb9c63
description:
Check if account number has an owner before using it
issue7924
review49671002
(grafted from 0daf4a12759b5f2c6c35284e5d8eb94c5a30eb4b)
diffstat:
account.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 56f02f00f95a -r 6a1bc2cb9c63 account.py
--- a/account.py Mon Apr 23 17:51:27 2018 +0200
+++ b/account.py Sat Dec 15 11:03:33 2018 +0100
@@ -101,7 +101,8 @@
])
if len(numbers) == 1:
number, = numbers
- return number.account.owners[0]
+ if number.account.owners:
+ return number.account.owners[0]
def coda_informations(self, coda_statement, move):
informations = {}