forked from DGNum/gestioCOF
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:
parent
4d9c66cb51
commit
57088cda03
1 changed files with 1 additions and 4 deletions
|
@ -55,7 +55,6 @@ from kfet.forms import (
|
||||||
UserForm,
|
UserForm,
|
||||||
UserGroupForm,
|
UserGroupForm,
|
||||||
UserInfoForm,
|
UserInfoForm,
|
||||||
UserRestrictForm,
|
|
||||||
)
|
)
|
||||||
from kfet.models import (
|
from kfet.models import (
|
||||||
Account,
|
Account,
|
||||||
|
@ -415,12 +414,10 @@ def account_update(request, trigramme):
|
||||||
if request.user == account.user:
|
if request.user == account.user:
|
||||||
missing_perm = False
|
missing_perm = False
|
||||||
account.refresh_from_db()
|
account.refresh_from_db()
|
||||||
user_form = UserRestrictForm(request.POST, instance=account.user)
|
|
||||||
account_form = AccountRestrictForm(request.POST, instance=account)
|
account_form = AccountRestrictForm(request.POST, instance=account)
|
||||||
pwd_form = AccountPwdForm(request.POST)
|
pwd_form = AccountPwdForm(request.POST)
|
||||||
|
|
||||||
if user_form.is_valid() and account_form.is_valid():
|
if account_form.is_valid():
|
||||||
user_form.save()
|
|
||||||
account_form.save()
|
account_form.save()
|
||||||
success = True
|
success = True
|
||||||
messages.success(request, "Vos informations ont été mises à jour")
|
messages.success(request, "Vos informations ont été mises à jour")
|
||||||
|
|
Loading…
Reference in a new issue