changeset e7424c7431e5 in modules/account_statement_coda:5.0
details: 
https://hg.tryton.org/modules/account_statement_coda?cmd=changeset;node=e7424c7431e5
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 21070a0f63c3 -r e7424c7431e5 account.py
--- a/account.py        Mon Oct 01 13:21:55 2018 +0200
+++ b/account.py        Sat Dec 15 11:03:33 2018 +0100
@@ -99,7 +99,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 = {}

Reply via email to