forked from DGNum/gestioCOF
Fix account create (encore)
This commit is contained in:
parent
14713ea630
commit
17723f6ea1
1 changed files with 2 additions and 2 deletions
|
@ -175,12 +175,12 @@ def get_account_create_forms(request=None, username=None, login_clipper=None):
|
||||||
user_form = UserForm(request.POST, initial=user_initial, from_clipper=True)
|
user_form = UserForm(request.POST, initial=user_initial, from_clipper=True)
|
||||||
cof_form = CofForm(request.POST, initial=cof_initial)
|
cof_form = CofForm(request.POST, initial=cof_initial)
|
||||||
else:
|
else:
|
||||||
user_form = UserForm(initial=user_initial)
|
user_form = UserForm(initial=user_initial, from_clipper=True)
|
||||||
cof_form = CofForm(initial=cof_initial)
|
cof_form = CofForm(initial=cof_initial)
|
||||||
|
|
||||||
# Protection (read-only) des champs username et login_clipper
|
# Protection (read-only) des champs username et login_clipper
|
||||||
account_form_set_readonly_fields(user_form, cof_form)
|
account_form_set_readonly_fields(user_form, cof_form)
|
||||||
if username and not login_clipper:
|
if username and not clipper:
|
||||||
try:
|
try:
|
||||||
user = User.objects.get(username=username)
|
user = User.objects.get(username=username)
|
||||||
# le user existe déjà
|
# le user existe déjà
|
||||||
|
|
Loading…
Reference in a new issue