forked from ScoDoc/ScoDoc
Fix typo in user_name check
This commit is contained in:
parent
a267c69501
commit
bfa61cf035
@ -296,7 +296,7 @@ class User(UserMixin, db.Model):
|
||||
self.user_name = data["user_name"]
|
||||
if "password" in data:
|
||||
self.set_password(data["password"])
|
||||
if not invalid_user_name(self.user_name):
|
||||
if invalid_user_name(self.user_name):
|
||||
raise ValueError(f"invalid user_name: {self.user_name}")
|
||||
# Roles: roles_string is "Ens_RT, Secr_RT, ..."
|
||||
if "roles_string" in data:
|
||||
|
@ -337,8 +337,9 @@ def create_user_form(user_name=None, edit=0, all_roles=True):
|
||||
"title": "Pseudo (login)",
|
||||
"size": 20,
|
||||
"allow_null": False,
|
||||
"explanation": "nom utilisé pour la connexion. Doit être unique parmi tous les utilisateurs."
|
||||
"Lettres ou chiffres uniquement.",
|
||||
"explanation": """nom utilisé pour la connexion.
|
||||
Doit être unique parmi tous les utilisateurs.
|
||||
Lettres ou chiffres uniquement.""",
|
||||
},
|
||||
),
|
||||
("formsemestre_id", {"input_type": "hidden"}),
|
||||
|
Loading…
Reference in New Issue
Block a user