mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
feat: Ajout des payementPlans dans le formulaire / ajout de la photo
This commit is contained in:
@ -231,6 +231,7 @@ class RegisterFormWithIdView(APIView):
|
||||
"""
|
||||
|
||||
studentForm_data = request.data.get('data', '{}')
|
||||
print(f'studentForm_data : {studentForm_data}')
|
||||
try:
|
||||
data = json.loads(studentForm_data)
|
||||
except json.JSONDecodeError:
|
||||
@ -239,10 +240,16 @@ class RegisterFormWithIdView(APIView):
|
||||
# Extraire le fichier photo
|
||||
photo_file = request.FILES.get('photo')
|
||||
|
||||
# Extraire le fichier photo
|
||||
sepa_file = request.FILES.get('sepa_file')
|
||||
|
||||
# Ajouter la photo aux données de l'étudiant
|
||||
if photo_file:
|
||||
data['student']['photo'] = photo_file
|
||||
|
||||
if sepa_file:
|
||||
data['sepa_file'] = sepa_file
|
||||
|
||||
# Gérer le champ `_status`
|
||||
_status = data.pop('status', 0)
|
||||
_status = int(_status)
|
||||
@ -307,7 +314,7 @@ class RegisterFormWithIdView(APIView):
|
||||
|
||||
elif _status == RegistrationForm.RegistrationFormStatus.RF_VALIDATED:
|
||||
# Vérifier si le paramètre fusion est activé via l'URL
|
||||
fusion = studentForm_data.get('fusion', False)
|
||||
fusion = data.get('fusion', False)
|
||||
if fusion:
|
||||
# Fusion des documents
|
||||
# Récupération des fichiers schoolFileTemplates
|
||||
|
||||
Reference in New Issue
Block a user