From 947518c69aefa2817f9391456dfaa5100753c152 Mon Sep 17 00:00:00 2001 From: Vincent Ardisson Date: Wed, 28 Mar 2018 14:40:22 +0200 Subject: [PATCH] [cragr] skip "RENTE" since they have no data Closes: 567987@redmine --- modules/cragr/web/pages.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/cragr/web/pages.py b/modules/cragr/web/pages.py index aa3ca09662..3f764078a9 100644 --- a/modules/cragr/web/pages.py +++ b/modules/cragr/web/pages.py @@ -669,7 +669,14 @@ class item(ItemElement): klass = Account def condition(self): - return self.el.xpath('./td[contains(@class, "cel-texte")]') + if not self.el.xpath('./td[contains(@class, "cel-texte")]'): + return False + + if Field('label')(self).startswith('RENTE'): + # RENTE account doesn't seem to have any balance or currency + return False + + return True obj_label = CleanText('./td[1]') obj_id = CleanText('./td[2]') -- GitLab