From d6c6a0882843b184e2c528f5312d7b74f766f9be Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 5 Jan 2022 21:11:57 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=202=20bugs=20sur=20formulaire=20cr=C3=A9at?= =?UTF-8?q?ion/modif=20utilisateurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users.py | 8 ++++---- sco_version.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/users.py b/app/views/users.py index be824173..1d10e0f7 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -543,10 +543,10 @@ def create_user_form(user_name=None, edit=0, all_roles=1): vals["active"] = vals["status"] == "" # Département: if auth_dept: # pas super-admin - if vals["dept"] not in selectable_dept_acronyms: + if ("dept" in vals) and (vals["dept"] not in selectable_dept_acronyms): del vals["dept"] # ne change pas de dept - # traitement des roles: ne doit pas affecter les roles - # que l'on en controle pas: + # Traitement des roles: ne doit pas affecter les rôles + # que l'on en contrôle pas: for role in orig_roles_strings: # { "Ens_RT", "Secr_CJ", ... } if role and not role in editable_roles_strings: roles.add(role) @@ -575,7 +575,7 @@ def create_user_form(user_name=None, edit=0, all_roles=1): # A: envoi de welcome + procedure de reset # B: envoi de welcome seulement (mot de passe saisie dans le formulaire) # C: Aucun envoi (mot de passe saisi dans le formulaire) - if vals["welcome:list"] == "1": + if vals["welcome"] == "1": if vals["reset_password:list"] == "1": mode = Mode.WELCOME_AND_CHANGE_PASSWORD else: diff --git a/sco_version.py b/sco_version.py index 6a155967..ed2b3728 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.1.17" +SCOVERSION = "9.1.18" SCONAME = "ScoDoc"