Fixed #63: First password is always generated after saving participant edit form.

This commit is contained in:
Emanuel Schuetze 2011-11-17 18:14:41 +01:00
parent c9b9eafbb2
commit 52dc3f2a1a

View File

@ -129,9 +129,9 @@ def edit(request, user_id=None):
user.save()
profile = profileform.save(commit=False)
profile.user = user
profile.firstpassword = gen_password()
profile.user.set_password(profile.firstpassword)
user.save()
if user_id is None:
profile.firstpassword = gen_password()
profile.user.set_password(profile.firstpassword)
profile.save()
if user_id is None:
messages.success(request, _('New participant was successfully created.'))