From 9b1de2fdb046c754faf898fc7e21e43ff1f9c5a0 Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Wed, 4 Sep 2019 15:47:57 +0200 Subject: [PATCH] [caissedepargne] Skip transactions without amount for Life Insurances MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some transactions have no amount value, for example "Avenant de clause bénéficiaire", which is not even a transaction (but is still in the JSON). Closes: 12553@zendesk, 12923@zendesk, 43857@sibi --- modules/caissedepargne/pages.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/caissedepargne/pages.py b/modules/caissedepargne/pages.py index 758d3452af..22d57a8952 100644 --- a/modules/caissedepargne/pages.py +++ b/modules/caissedepargne/pages.py @@ -1224,6 +1224,10 @@ def find_elements(self): class item(ItemElement): klass = Transaction + def condition(self): + # Eliminate transactions without amount + return Dict('montantBrut')(self) + obj_raw = Transaction.Raw(Dict('type/libelleLong')) obj_amount = Eval(float_to_decimal, Dict('montantBrut/valeur')) -- GitLab