Fix account create (encore)

This commit is contained in:
Aurélien Delobelle 2016-09-01 15:03:33 +02:00
parent 14713ea630
commit 17723f6ea1

View file

@ -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)
cof_form = CofForm(request.POST, initial=cof_initial)
else:
user_form = UserForm(initial=user_initial)
user_form = UserForm(initial=user_initial, from_clipper=True)
cof_form = CofForm(initial=cof_initial)
# Protection (read-only) des champs username et login_clipper
account_form_set_readonly_fields(user_form, cof_form)
if username and not login_clipper:
if username and not clipper:
try:
user = User.objects.get(username=username)
# le user existe déjà