From 1ddf9b6ab82654161c763b17322f75a6ae7a7870 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 12 Apr 2024 15:50:53 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20cr=C3=A9ation=20utilisateur=20si=20un=20?= =?UTF-8?q?seul=20d=C3=A9partement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'}", }, ) )