Support market accounts with browser2

This commit is contained in:
Florent 2014-03-28 13:23:53 +01:00
commit df85155463
3 changed files with 34 additions and 44 deletions

View file

@ -99,11 +99,9 @@ class INGBackend(BaseBackend, ICapBank, ICapBill):
return self.browser.transfer(account, recipient, amount, reason)
def iter_investment(self, account):
with self.browser:
if not isinstance(account, Account):
account = self.get_account(account)
for investment in self.browser.get_investments(account):
yield investment
if not isinstance(account, Account):
account = self.get_account(account)
return self.browser.get_investments(account)
def iter_subscription(self):
for subscription in self.browser.get_subscriptions():