Fix - Watches werent falling back to global default formats correctly when required (#1656)

test-cleanups^2
dgtlmoon 2023-06-28 00:03:02 +02:00 zatwierdzone przez GitHub
rodzic e709201955
commit 2f777ea3bb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -92,6 +92,12 @@ def process_notification(n_object, datastore):
n_object.get('notification_format', default_notification_format),
valid_notification_formats[default_notification_format],
)
# If we arrived with 'System default' then look it up
if n_format == default_notification_format_for_watch and datastore.data['settings']['application'].get('notification_format') != default_notification_format_for_watch:
# Initially text or whatever
n_format = datastore.data['settings']['application'].get('notification_format', valid_notification_formats[default_notification_format])
# https://github.com/caronc/apprise/wiki/Development_LogCapture
# Anything higher than or equal to WARNING (which covers things like Connection errors)

Wyświetl plik

@ -71,7 +71,7 @@ class update_worker(threading.Thread):
from changedetectionio.notification import (
default_notification_format_for_watch,
default_notification_body,
default_notification_title,
default_notification_title
)