From bce7eb68fbb58b593eb4804eb30d109bd944376c Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 29 Jan 2024 14:20:39 +0100 Subject: [PATCH] Notifications - skip empty notification URLs from being processed (#2138) --- changedetectionio/notification.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changedetectionio/notification.py b/changedetectionio/notification.py index b2046004..21bda720 100644 --- a/changedetectionio/notification.py +++ b/changedetectionio/notification.py @@ -152,6 +152,10 @@ def process_notification(n_object, datastore): with apprise.LogCapture(level=apprise.logging.DEBUG) as logs: for url in n_object['notification_urls']: url = url.strip() + if not url: + logger.warning(f"Process Notification: skipping empty notification URL.") + continue + logger.info(">> Process Notification: AppRise notifying {}".format(url)) url = jinja2_env.from_string(url).render(**notification_parameters)