Commit 1bd5c64d authored by Maxime Gasselin's avatar Maxime Gasselin Committed by ntome

[bp] avoid bug for empty market account

We returned a None liquidity object. We now return an empty list.

Closes: 10880@zendesk
parent f66600cc
......@@ -418,7 +418,10 @@ class BPBrowser(LoginBrowser, StatesMixin):
if account.type in (account.TYPE_PEA, account.TYPE_MARKET):
self.go_linebourse(account)
investments = list(self.linebourse.iter_investment(account.id))
investments.append(self.linebourse.get_liquidity(account.id))
liquidity = self.linebourse.get_liquidity(account.id)
if liquidity:
# avoid to append None
investments.append(liquidity)
return investments
if account.type != Account.TYPE_LIFE_INSURANCE:
......
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