Commit 79fe499a authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[ing] avoid market page redirection when there is null balance

some market accounts link with null balance redirect to logout page
avoid it because it can crash iter accounts
parent 8f16784a
......@@ -23,6 +23,7 @@ import hashlib
import time
import json
from decimal import Decimal
from requests.exceptions import SSLError
from weboob.browser import LoginBrowser, URL, need_login
......@@ -179,6 +180,11 @@ class IngBrowser(LoginBrowser):
self.accountspage.go()
self.where = 'start'
if account.balance == Decimal('0'):
# some market accounts link with null balance redirect to logout page
# avoid it because it can crash iter accounts
return
self.change_space(account._space)
data = self.get_investments_data(account)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment