Fix: bug si user_name ne contient que des chiffres

This commit is contained in:
Emmanuel Viennet 2022-01-07 15:19:34 +01:00
parent 20c8f22c7b
commit d1ff47727b
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@
{% block app_content %}
<h1>Modification du compte ScoDoc <tt>{{form.user_name.data}}</tt></h1>
<div class="help">
<p>Identifiez-vous avez votre mot de passe actuel</p>
<p>Identifiez-vous avec votre mot de passe actuel</p>
</div>
<form method=post>
{{ form.user_name }}

View File

@ -753,7 +753,7 @@ def user_info_page(user_name=None):
if not user_name:
user = current_user
else:
user = User.query.filter_by(user_name=user_name).first()
user = User.query.filter_by(user_name=str(user_name)).first()
if not user:
raise ScoValueError("invalid user_name")