diff --git a/app/views/users.py b/app/views/users.py index 459c76b7..5065c17c 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -504,7 +504,7 @@ def create_user_form(user_name=None, edit=0, all_roles=True): if g.scodoc_dept in selectable_dept_acronyms else (auth_dept or "") ) - if len(selectable_dept_acronyms) > 1: + if len(selectable_dept_acronyms) > 0: selectable_dept_acronyms = sorted(list(selectable_dept_acronyms)) descr.append( ( @@ -529,7 +529,7 @@ def create_user_form(user_name=None, edit=0, all_roles=True): { "input_type": "separator", "title": f"""L'utilisateur appartient au département { - the_user.dept or "(tous)"}""", + the_user.dept or "(tous/aucun)"}""", }, ) ) @@ -539,7 +539,7 @@ def create_user_form(user_name=None, edit=0, all_roles=True): "d", { "input_type": "separator", - "title": f"L'utilisateur sera créé dans le département {auth_dept}", + "title": f"L'utilisateur sera créé dans le département {auth_dept or 'aucun'}", }, ) )