From 4f986a091bd93c08efa59f7842c0f00cb5da5a10 Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Mon, 23 Jul 2018 11:46:28 +0200 Subject: [PATCH] [spirica] Added symbols='-' for the transaction dates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A weboob contributor proposed a patch to fix the Date when empty: "For the field date, the module use the column "Date de réception" and "Date de valeur" if the first is empty. But Spirica uses "-" when the cell is empty, so no date is returned and boobank uses today's date as default value." I adapted his merge request since we now use CleanText instead of TableCell for iter_history, with the connection I have the symbols='-' does not change any date but maybe in some cases it will prevent boobank from returning today's date by default. --- modules/spirica/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/spirica/pages.py b/modules/spirica/pages.py index 9c535177b2..74bed66e4f 100644 --- a/modules/spirica/pages.py +++ b/modules/spirica/pages.py @@ -267,7 +267,7 @@ class item(ItemElement): obj_vdate = Date(CleanText('./td[8]'), dayfirst=True) def obj_date(self): - return Date(CleanText('./td[6]'), dayfirst=True, default=Field('vdate')(self))(self) + return Date(CleanText('./td[6]', symbols='-'), dayfirst=True, default=Field('vdate')(self))(self) def obj_amount(self): # We display the raw amount only if the net amount is not available. -- GitLab