File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments