mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
feat: Refactoring de la fonction de création de profil sur guardian côté
FRONT
This commit is contained in:
@ -20,7 +20,13 @@ class RegistrationFileGroupView(APIView):
|
||||
"""
|
||||
Récupère tous les groupes de fichiers d'inscription.
|
||||
"""
|
||||
establishment_id = request.GET.get('establishment_id', None)
|
||||
if establishment_id is None:
|
||||
return JsonResponse({'error': 'establishment_id est requis'}, safe=False, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
groups = RegistrationFileGroup.objects.all()
|
||||
if groups:
|
||||
groups = groups.filter(establishment_id=establishment_id).distinct()
|
||||
serializer = RegistrationFileGroupSerializer(groups, many=True)
|
||||
return Response(serializer.data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user