diff --git a/modules/creditmutuel/pages.py b/modules/creditmutuel/pages.py index 90454f3b0dba8a5980285ab57ff448ab1b76c837..30762185a532b9b38c6817e28a5752396ef6ef86 100644 --- a/modules/creditmutuel/pages.py +++ b/modules/creditmutuel/pages.py @@ -802,6 +802,11 @@ def __call__(self, item): for txt in el.itertext() if txt.strip()) # Removing empty strings parts = list(filter(bool, parts)) + + # Some transactions have no label + if not parts: + return NotAvailable + # To simplify categorization of CB, reverse order of parts to separate # location and institution detail = "Cliquer pour déplier ou plier le détail de l'opération" @@ -812,7 +817,11 @@ def __call__(self, item): return ' '.join(parts) - obj_raw = Transaction.Raw(OwnRaw()) + def obj_raw(self): + own_raw = self.OwnRaw()(self) + if empty(own_raw): + return NotAvailable + return Transaction.Raw(self.OwnRaw())(self) def find_amount(self, title): try: