forked from ScoDoc/ScoDoc
Fix: typo creation users
This commit is contained in:
parent
eab7894f4f
commit
53a008781f
@ -531,12 +531,12 @@ def create_user_form(user_name=None, edit=0, all_roles=True):
|
|||||||
user_name = vals["user_name"]
|
user_name = vals["user_name"]
|
||||||
# ce login existe ?
|
# ce login existe ?
|
||||||
err_msg = None
|
err_msg = None
|
||||||
existing_user = User.query.filter_by(user_name=user_name).count() > 0
|
nb_existing_user = User.query.filter_by(user_name=user_name).count() > 0
|
||||||
if (
|
if edit and (
|
||||||
edit and not existing_user
|
nb_existing_user == 0
|
||||||
): # safety net, le user_name ne devrait pas changer
|
): # safety net, le user_name ne devrait pas changer
|
||||||
err_msg = f"identifiant {user_name} inexistant"
|
err_msg = f"identifiant {user_name} inexistant"
|
||||||
if not edit and not existing_user:
|
if not edit and nb_existing_user > 0:
|
||||||
err_msg = f"identifiant {user_name} déjà utilisé"
|
err_msg = f"identifiant {user_name} déjà utilisé"
|
||||||
if err_msg:
|
if err_msg:
|
||||||
H.append(tf_error_message(f"""Erreur: {err_msg}"""))
|
H.append(tf_error_message(f"""Erreur: {err_msg}"""))
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.3.29"
|
SCOVERSION = "9.3.30"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user