diff --git a/modules/lcl/pages.py b/modules/lcl/pages.py index 9f2d50a010500b1b28b43a7b246c3667e43deffc..f53e054cc0b943518632cb922200342a380ecbe9 100644 --- a/modules/lcl/pages.py +++ b/modules/lcl/pages.py @@ -42,7 +42,7 @@ from weboob.browser.filters.html import Attr, Link, TableCell, AttributeNotFound from weboob.browser.filters.standard import ( CleanText, Field, Regexp, Format, Date, CleanDecimal, Map, AsyncLoad, Async, Env, Slugify, - BrowserURL, Eval, Lower, Currency, + BrowserURL, Eval, Currency, ) from weboob.browser.filters.json import Dict from weboob.exceptions import BrowserUnavailable, BrowserIncorrectPassword @@ -963,9 +963,14 @@ class iter_life_insurance(DictElement): class item(ItemElement): def condition(self): - return ( - Lower(Dict('lcstacntgen'))(self) == 'actif' - and Lower(Dict('lcgampdt'))(self) == 'epargne' + activity = Dict('lcstacntgen')(self) + account_type = Dict('lcgampdt')(self) + # We ignore accounts without activities or when the activity is 'Closed', + # they are inactive and closed and they don't appear on the website. + return bool( + activity and account_type + and activity.lower() == 'actif' + and account_type.lower() == 'epargne' ) klass = Account