From e0eae75099e447b3b69b7faa94504032d7316070 Mon Sep 17 00:00:00 2001
From: Bastien Le Querrec <blq@laquadrature.net>
Date: Tue, 7 Jan 2025 11:52:35 +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 337b465..0aa49b6 100644
--- a/Attrap_prefdpt.py
+++ b/Attrap_prefdpt.py
@@ -200,7 +200,7 @@ class Attrap_prefdpt(Attrap):
                         self.elements.append(raa)
                     else:
                         # Si une date a été trouvée, on regarde s'il faut ajouter l'URL à la liste des pages à parser
-                        if date_is_correct or (date.year == 9999 and widget.follow_link_on_unrecognised_date):
+                        if date_is_correct or ((date is None or date.year == 9999) and widget.follow_link_on_unrecognised_date):
                             self.page_urls_to_parse.append(card['url'])
 
     def parse_select_widgets(self, page_url, page_content):
-- 
GitLab