Fixed #63: First password is always generated after saving participant edit form.
This commit is contained in:
parent
c9b9eafbb2
commit
52dc3f2a1a
@ -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.'))
|
||||||
|
Loading…
Reference in New Issue
Block a user