fix inconsistent history on loan accounts if there is no init date
This commit is contained in:
parent
b4832b3c54
commit
cb511a7245
1 changed files with 4 additions and 0 deletions
|
|
@ -23,6 +23,7 @@ from decimal import Decimal, InvalidOperation
|
|||
import re
|
||||
from cStringIO import StringIO
|
||||
|
||||
from weboob.capabilities import NotAvailable
|
||||
from weboob.capabilities.bank import Account
|
||||
from weboob.browser.pages import HTMLPage, LoggedPage
|
||||
from weboob.browser.elements import ListElement, ItemElement, method
|
||||
|
|
@ -137,6 +138,9 @@ class IndexPage(LoggedPage, HTMLPage):
|
|||
total_amount = - self.loan_total_amount(self.doc)
|
||||
amount = self.loan_amount(self.doc)
|
||||
|
||||
if init_date is NotAvailable and total_amount == Decimal('0.0'):
|
||||
return
|
||||
|
||||
for _ in xrange(nb):
|
||||
next_date = next_date - relativedelta(months=1)
|
||||
tr = Transaction()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue