Skip to content

Commit 4dfc8c3

Browse files
committed
fix routing
1 parent 4ecd424 commit 4dfc8c3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

page_analyzer/app.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def create_url():
3737

3838
if error_message:
3939
flash(error_message, 'error')
40-
return render_template('index.html', url=url_input), 422 # Возвращаем ошибку 422 с HTML
40+
return render_template('index.html', url=url_input), 422
4141

4242
# Нормализация URL
4343
normalized_url = url_input.strip()
@@ -53,8 +53,7 @@ def create_url():
5353
# Проверяем, если в базе данных есть URL
5454
if existing_urls:
5555
for existing_url in existing_urls:
56-
# Убедитесь, что у вас есть правильный доступ к элементам
57-
if len(existing_url) > 1: # Проверяем, что у нас есть как минимум 2 элемента
56+
if len(existing_url) > 1:
5857
parsed_existing_url = urlparse(existing_url[1])
5958
base_existing_domain = f"{parsed_existing_url.scheme}://{parsed_existing_url.netloc}"
6059

0 commit comments

Comments
 (0)