From d1ff47727bc3dbdcd8f3c2c82fe6ebf8efc3c1bd Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 7 Jan 2022 15:19:34 +0100 Subject: [PATCH] Fix: bug si user_name ne contient que des chiffres --- app/templates/auth/change_password.html | 2 +- app/views/users.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/auth/change_password.html b/app/templates/auth/change_password.html index 2bec77622..c6c723762 100644 --- a/app/templates/auth/change_password.html +++ b/app/templates/auth/change_password.html @@ -23,7 +23,7 @@ {% block app_content %}

Modification du compte ScoDoc {{form.user_name.data}}

-

Identifiez-vous avez votre mot de passe actuel

+

Identifiez-vous avec votre mot de passe actuel

{{ form.user_name }} diff --git a/app/views/users.py b/app/views/users.py index 1d10e0f77..608eb9ab7 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -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")