From a1d818654629d8970ab0795ca740b6370fb54559 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 21 Oct 2024 09:32:02 +0200 Subject: [PATCH] Update changedetectionio/flask_app.py --- changedetectionio/flask_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changedetectionio/flask_app.py b/changedetectionio/flask_app.py index 027581d1..a1bb862e 100644 --- a/changedetectionio/flask_app.py +++ b/changedetectionio/flask_app.py @@ -543,7 +543,7 @@ def changedetection_app(config=None, datastore_o=None): is_group_settings_form = request.args.get('mode', '') == 'group-settings' # Use an existing random one on the global/main settings form if not watch_uuid and (is_global_settings_form or is_group_settings_form) \ - and len(list(datastore.data['watching'].keys())) > 0: + and datastore.data.get('watching'): logger.debug(f"Send test notification - Choosing random Watch {watch_uuid}") watch_uuid = random.choice(list(datastore.data['watching'].keys()))