Notifications - skip empty notification URLs from being processed (#2138)

test-tidy
dgtlmoon 2024-01-29 14:20:39 +01:00 zatwierdzone przez GitHub
rodzic 93c0385119
commit bce7eb68fb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -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)