From 0ebb6be1f0d702ee10238e09b9ea1445f81dd256 Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Mon, 20 May 2019 18:47:41 +0200 Subject: [PATCH] [s2e] Ignore the 'ETOILE' prefix for account typing Most accounts are called 'PEE' or 'PEI' but some accounts start with 'ETOILE PEI' so we must take the second element of the label in these cases to type the account. --- modules/s2e/pages.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/s2e/pages.py b/modules/s2e/pages.py index 3e81a21f2d..fad08570c8 100644 --- a/modules/s2e/pages.py +++ b/modules/s2e/pages.py @@ -385,6 +385,8 @@ def condition(self): obj_label = Env('label') def obj_type(self): + if Field('label')(self).startswith('ETOILE'): + return self.page.TYPES.get(Field('label')(self).split()[1].upper(), Account.TYPE_UNKNOWN) return self.page.TYPES.get(Field('label')(self).split()[0].upper(), Account.TYPE_UNKNOWN) def obj_balance(self): -- GitLab