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() user.save()
profile = profileform.save(commit=False) profile = profileform.save(commit=False)
profile.user = user profile.user = user
profile.firstpassword = gen_password() if user_id is None:
profile.user.set_password(profile.firstpassword) profile.firstpassword = gen_password()
user.save() profile.user.set_password(profile.firstpassword)
profile.save() profile.save()
if user_id is None: if user_id is None:
messages.success(request, _('New participant was successfully created.')) messages.success(request, _('New participant was successfully created.'))