Correction modification profil employé
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Organisation/sirh/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2026-06-18 10:39:07 +00:00
parent 415860f233
commit a28b177eba
2 changed files with 5 additions and 2 deletions

View File

@@ -191,7 +191,7 @@ def modifier_employer(request):
except Employe.DoesNotExist:
return JsonResponse({"message": "Employé non trouvé."})
if request.method == "POST":
data = json.loads(request.body)
data = request.POST
user = User.objects.get(username=request.user)
user.last_name = data['nom']
user.first_name = data['prenom']