fix crash on unknown accounts types
This commit is contained in:
parent
1a381467e3
commit
1be3f3bc87
1 changed files with 3 additions and 3 deletions
|
|
@ -130,11 +130,11 @@ class AccountsPage(LoggedPage, HTMLPage):
|
||||||
|
|
||||||
# Handle real balances
|
# Handle real balances
|
||||||
page = self.page.browser.open(link).page
|
page = self.page.browser.open(link).page
|
||||||
coming = page.find_amount(u"Opérations à venir")
|
coming = page.find_amount(u"Opérations à venir") if page else None
|
||||||
accounting = page.find_amount(u"Solde comptable")
|
accounting = page.find_amount(u"Solde comptable") if page else None
|
||||||
|
|
||||||
if accounting is not None and accounting + (coming or Decimal('0')) != balance:
|
if accounting is not None and accounting + (coming or Decimal('0')) != balance:
|
||||||
self.logger.warning('%s + %s != %s' % (accounting, coming, balance))
|
self.page.logger.warning('%s + %s != %s' % (accounting, coming, balance))
|
||||||
|
|
||||||
if accounting is not None:
|
if accounting is not None:
|
||||||
balance = accounting
|
balance = accounting
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue