From ff948cb98df66a5d3c4d202bb2ad2765e784f0b3 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 5 Jan 2022 01:04:07 +0100 Subject: [PATCH] new users default dept in form --- app/views/users.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/users.py b/app/views/users.py index 21c992fda..be824173f 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -388,6 +388,9 @@ def create_user_form(user_name=None, edit=0, all_roles=1): "explanation": """département de rattachement de l'utilisateur""", "labels": selectable_dept_acronyms, "allowed_values": selectable_dept_acronyms, + "default": g.scodoc_dept + if g.scodoc_dept in selectable_dept_acronyms + else "", }, ) )