From 40978f30ee5f219efe2e13ea37a0dfa9590b050b Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 8 Mar 2023 21:38:36 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20cr=C3=A9ation=20utilisateur=20avec=20CAS?= =?UTF-8?q?=20par=20non=20super-admin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users.py b/app/views/users.py index 8e88a87e95..d9c8a1fa45 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -596,7 +596,7 @@ def create_user_form(user_name=None, edit=0, all_roles=True): email=vals["email"], dept=vals.get("dept", auth_dept), roles=vals["roles"], - cas_id=vals["cas_id"], + cas_id=vals.get("cas_id"), # pas présent si pas super-admin ) if not ok_modif: H.append(tf_error_message(msg)) @@ -729,12 +729,12 @@ def create_user_form(user_name=None, edit=0, all_roles=True): ), ) + flash("Nouvel utilisateur créé") return flask.redirect( url_for( "users.user_info_page", scodoc_dept=g.scodoc_dept, user_name=user_name, - head_message="Nouvel utilisateur créé", ) )