apps: do not allow to move an existing agent in the OU usagers
This commit is contained in:
parent
470e3102c5
commit
a413a0ace2
|
@ -155,6 +155,8 @@ class AppConfig(django.apps.AppConfig):
|
|||
'generate_password']:
|
||||
del form.fields[field_name]
|
||||
form.fields['email'].required = True
|
||||
# do not allow to move an agent in the usagers OU
|
||||
form.fields['ou'].queryset = form.fields['ou'].queryset.exclude(slug='usagers')
|
||||
|
||||
# Si un compte est validé, on interdit la modification des attributs coeurs
|
||||
if form.instance.attributes.validated:
|
||||
|
|
Loading…
Reference in New Issue