mirror of
https://github.com/lalanza808/monero.fail.git
synced 2025-03-15 09:46:31 -04:00
enforce lower case chars on add/import
This commit is contained in:
parent
ea2834eedb
commit
5cda6ecf81
@ -82,7 +82,7 @@ def add():
|
||||
flash("This doesn\"t look like a valid URL")
|
||||
else:
|
||||
_url = urlparse(url)
|
||||
url = f"{_url.scheme}://{_url.netloc}"
|
||||
url = f"{_url.scheme}://{_url.netloc}".lower()
|
||||
if Node.select().where(Node.url == url).exists():
|
||||
flash("This node is already in the database.")
|
||||
else:
|
||||
@ -187,7 +187,7 @@ def import_():
|
||||
with open(export_dir, 'r') as f:
|
||||
for url in f.readlines():
|
||||
try:
|
||||
n = url.rstrip()
|
||||
n = url.rstrip().lower()
|
||||
logging.info(f"Adding {n}")
|
||||
node = Node(url=n)
|
||||
node.save()
|
||||
|
Loading…
x
Reference in New Issue
Block a user