forked from ScoDoc/DocScoDoc
Fix: bug si user_name ne contient que des chiffres
This commit is contained in:
parent
20c8f22c7b
commit
d1ff47727b
@ -23,7 +23,7 @@
|
|||||||
{% block app_content %}
|
{% block app_content %}
|
||||||
<h1>Modification du compte ScoDoc <tt>{{form.user_name.data}}</tt></h1>
|
<h1>Modification du compte ScoDoc <tt>{{form.user_name.data}}</tt></h1>
|
||||||
<div class="help">
|
<div class="help">
|
||||||
<p>Identifiez-vous avez votre mot de passe actuel</p>
|
<p>Identifiez-vous avec votre mot de passe actuel</p>
|
||||||
</div>
|
</div>
|
||||||
<form method=post>
|
<form method=post>
|
||||||
{{ form.user_name }}
|
{{ form.user_name }}
|
||||||
|
@ -753,7 +753,7 @@ def user_info_page(user_name=None):
|
|||||||
if not user_name:
|
if not user_name:
|
||||||
user = current_user
|
user = current_user
|
||||||
else:
|
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:
|
if not user:
|
||||||
raise ScoValueError("invalid user_name")
|
raise ScoValueError("invalid user_name")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user