Update changedetectionio/flask_app.py

pull/2727/head
dgtlmoon 2 months ago committed by GitHub
parent d82f254382
commit a1d8186546
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -543,7 +543,7 @@ def changedetection_app(config=None, datastore_o=None):
is_group_settings_form = request.args.get('mode', '') == 'group-settings' is_group_settings_form = request.args.get('mode', '') == 'group-settings'
# Use an existing random one on the global/main settings form # 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) \ 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}") logger.debug(f"Send test notification - Choosing random Watch {watch_uuid}")
watch_uuid = random.choice(list(datastore.data['watching'].keys())) watch_uuid = random.choice(list(datastore.data['watching'].keys()))

Loading…
Cancel
Save