changeset 0daf4a12759b in modules/account_statement_coda:default
details: 
https://hg.tryton.org/modules/account_statement_coda?cmd=changeset;node=0daf4a12759b
description:
        Check if account number has an owner before using it

        issue7924
        review49671002
diffstat:

 account.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 7e26632e597d -r 0daf4a12759b 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