Notifications - Support for commented out notification URLs (#2825 #2769)

This commit is contained in:
dgtlmoon
2024-12-04 18:08:52 +01:00
committed by GitHub
parent 2614b275f0
commit 1fb0adde54
2 changed files with 10 additions and 2 deletions

View File

@@ -308,8 +308,12 @@ class ValidateAppRiseServers(object):
# so that the custom endpoints are registered
from changedetectionio.apprise_plugin import apprise_custom_api_call_wrapper
for server_url in field.data:
if not apobj.add(server_url):
message = field.gettext('\'%s\' is not a valid AppRise URL.' % (server_url))
url = server_url.strip()
if url.startswith("#"):
continue
if not apobj.add(url):
message = field.gettext('\'%s\' is not a valid AppRise URL.' % (url))
raise ValidationError(message)
class ValidateJinja2Template(object):