From db59bf73e1cfdad428c83501b6397c84c38540be Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 3 Apr 2024 17:10:13 +0200 Subject: [PATCH] "Send Test Notification" - In "Group" settings form it should not fallback to the system wide notifications when sending a test if nothing is set. --- changedetectionio/blueprint/tags/templates/edit-tag.html | 2 +- changedetectionio/flask_app.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changedetectionio/blueprint/tags/templates/edit-tag.html b/changedetectionio/blueprint/tags/templates/edit-tag.html index 9834f566..7c3bf42b 100644 --- a/changedetectionio/blueprint/tags/templates/edit-tag.html +++ b/changedetectionio/blueprint/tags/templates/edit-tag.html @@ -3,7 +3,7 @@ {% from '_helpers.jinja' import render_field, render_checkbox_field, render_button %} {% from '_common_fields.jinja' import render_common_settings_form %} diff --git a/changedetectionio/flask_app.py b/changedetectionio/flask_app.py index 25aea8a7..e7ab0744 100644 --- a/changedetectionio/flask_app.py +++ b/changedetectionio/flask_app.py @@ -527,7 +527,8 @@ def changedetection_app(config=None, datastore_o=None): notification_urls = tag.get('notifications_urls') if tag and tag.get('notifications_urls') else None is_global_settings_form = request.args.get('mode', '') == 'global-settings' - if not notification_urls and not is_global_settings_form: + is_group_settings_form = request.args.get('mode', '') == 'group-settings' + if not notification_urls and not is_global_settings_form and not is_group_settings_form: # In the global settings, use only what is typed currently in the text box logger.debug("Test notification - Trying by global system settings notifications") if datastore.data['settings']['application'].get('notification_urls'):