Don't allow duplicate URLs on import re #377

This commit is contained in:
dgtlmoon
2022-01-25 10:22:39 +01:00
parent ac7378b7fb
commit 2fa1d48f01
+1 -1
View File
@@ -629,7 +629,7 @@ def changedetection_app(config=None, datastore_o=None):
for url in urls:
url = url.strip()
# Flask wtform validators wont work with basic auth, use validators package
if len(url) and validators.url(url):
if len(url) and validators.url(url) and not datastore.url_exists(url):
new_uuid = datastore.add_watch(url=url.strip(), tag="")
# Straight into the queue.
update_q.put(new_uuid)