From bbef05ce03de66d9dba26ceb17d746e1832b13ad Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Thu, 29 Nov 2018 17:47:49 +0100 Subject: [PATCH] [creditdunord] Corrected ISIN research in Label Some ISIN codes are written as "fr56168431698" so we must consider small letters too. Plus the current code caught "TECHNOLOGIES" as a potential ISIN. The new code takes in consideration these matters. --- modules/creditdunord/pages.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/creditdunord/pages.py b/modules/creditdunord/pages.py index 236a1206fc..33b38daefc 100755 --- a/modules/creditdunord/pages.py +++ b/modules/creditdunord/pages.py @@ -670,9 +670,10 @@ class item(ItemElement): obj_portfolio_share = Eval(lambda x: x / 100, MyDecimal(TableCell('portfolio_share'))) def obj_code(self): - code = Regexp(Field('label'), '([0-9A-Z]{12})')(self) - if is_isin_valid(code): - return code + for code in Field('label')(self).split(): + if is_isin_valid(code): + return code + return NotAvailable def obj_code_type(self): if is_isin_valid(Field('code')(self)): -- GitLab