From 04b2e48987a2e5b9d9bd4f88123078f2e3678546 Mon Sep 17 00:00:00 2001 From: Bastien Le Querrec <blq@laquadrature.net> Date: Tue, 7 Jan 2025 12:30:45 +0100 Subject: [PATCH] =?UTF-8?q?prefdpt:=20corrige=20un=20crash=20lorsqu'aucune?= =?UTF-8?q?=20date=20n'a=20=C3=A9t=C3=A9=20d=C3=A9tect=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Attrap_prefdpt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Attrap_prefdpt.py b/Attrap_prefdpt.py index 0aa49b6..109eeea 100644 --- a/Attrap_prefdpt.py +++ b/Attrap_prefdpt.py @@ -194,7 +194,7 @@ class Attrap_prefdpt(Attrap): # Si la configuration indique que les liens renvoient vers un RAA, on ajoute le lien à la liste des éléments if widget.link_to_raa or (widget.autodetect_links_to_raa and card['url'].endswith('.pdf')): - if date.year == 9999: + if date and date.year == 9999: date = None raa = Attrap.RAA(card['url'], date, card['name'].strip(), timezone=self.timezone) self.elements.append(raa) -- GitLab