The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

Commit 53a645e9 authored by Vincent Ardisson's avatar Vincent Ardisson Committed by Romain Bignon

[spirica] 0% portfolio_share is different than NotAvailable

parent b340e694
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
TableCell, Field, Async, AsyncLoad, Eval TableCell, Field, Async, AsyncLoad, Eval
from weboob.browser.filters.html import Attr, Link from weboob.browser.filters.html import Attr, Link
from weboob.capabilities.bank import Account, Investment, Transaction from weboob.capabilities.bank import Account, Investment, Transaction
from weboob.capabilities.base import NotAvailable from weboob.capabilities.base import NotAvailable, empty
from weboob.exceptions import BrowserUnavailable from weboob.exceptions import BrowserUnavailable
...@@ -104,7 +104,7 @@ def obj_valuation(self): ...@@ -104,7 +104,7 @@ def obj_valuation(self):
def obj_portfolio_share(self): def obj_portfolio_share(self):
ps = MyDecimal(TableCell('portfolio_share', default=None))(self) ps = MyDecimal(TableCell('portfolio_share', default=None))(self)
return Eval(lambda x: x / 100, ps)(self) if ps else NotAvailable return Eval(lambda x: x / 100, ps)(self) if not empty(ps) else NotAvailable
class TableTransactionsInvestment(TableInvestment): class TableTransactionsInvestment(TableInvestment):
......
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