Skip to content

Commit 7802ded

Browse files
committed
fix answer url
1 parent 754eb9e commit 7802ded

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

page_analyzer/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ def get_db_connection():
2323
def index():
2424
if request.method == 'POST':
2525
url_input = request.form.get('url')
26+
# Проверка валидности
2627
if not validators.url(url_input) or len(url_input) > 255:
27-
# вызываем /urls явно или делаем редирект
28+
# Вместо рендера ошибки — редирект на /urls с этим же URL
2829
return redirect(url_for('urls', url=url_input))
2930
return redirect(url_for('urls', url=url_input))
3031
return render_template('index.html')

0 commit comments

Comments
 (0)