fix: default date observation to today if no url

This commit is contained in:
2026-07-21 00:34:11 +02:00
parent 2df5fe0e89
commit cc0510791a
+3
View File
@@ -28,6 +28,9 @@ def extract_announcement_date(observationId, observationUrl):
return date.fromisoformat(db.get(q.id == observationId)["date"])
else:
logger.debug(f"observation {str(observationId)} is a new observation.")
if observationUrl == "-":
# for some reason some observations have "-" as the url
return date.today()
html = fetchUrlToHtml(observationUrl)
soup = BeautifulSoup(html, "html.parser")