Fix le problème des prénoms manquants

Depuis !360, quand on modifie son propre compte K-Fêt, cela supprime les
noms associés sur gestioCOF... Le problème est réglé, normalement.
This commit is contained in:
Ludovic Stephan 2019-11-03 00:02:34 +01:00
parent 4d9c66cb51
commit 57088cda03

View file

@ -55,7 +55,6 @@ from kfet.forms import (
UserForm,
UserGroupForm,
UserInfoForm,
UserRestrictForm,
)
from kfet.models import (
Account,
@ -415,12 +414,10 @@ def account_update(request, trigramme):
if request.user == account.user:
missing_perm = False
account.refresh_from_db()
user_form = UserRestrictForm(request.POST, instance=account.user)
account_form = AccountRestrictForm(request.POST, instance=account)
pwd_form = AccountPwdForm(request.POST)
if user_form.is_valid() and account_form.is_valid():
user_form.save()
if account_form.is_valid():
account_form.save()
success = True
messages.success(request, "Vos informations ont été mises à jour")