Commit d42a472c authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

[accounts] added yearrevalidation users to list view api

parent 19d494b0
Pipeline #11632 passed with stage
in 38 minutes and 22 seconds
......@@ -96,7 +96,7 @@ class GodfatherListView(generics.ListAPIView):
#3) an existing validated user requesting a change of supervisor
#4) a blocked user requesting a supervision
#On all cases check the current key in supervisee profile match the supervisiontrack key as this is the current supervision request/track from the supervisee
queryset = SupervisionTrack.objects.filter(godfather=request.user).filter(Q(supervisee__profile__status=Profile.WAITINGVALIDATION)|Q(supervisee__profile__status=Profile.REJECTED)|Q(supervisee__profile__status=Profile.ACCEPTED)|Q(supervisee__profile__status=Profile.BLOCKED)).filter(Q(supervisee__profile__supervision_key=models.F('supervision_key')))
queryset = SupervisionTrack.objects.filter(godfather=request.user).filter(Q(supervisee__profile__status=Profile.WAITINGVALIDATION)|Q(supervisee__profile__status=Profile.REJECTED)|Q(supervisee__profile__status=Profile.YEARREVALIDATION)|Q(supervisee__profile__status=Profile.ACCEPTED)|Q(supervisee__profile__status=Profile.BLOCKED)).filter(Q(supervisee__profile__supervision_key=models.F('supervision_key')))
serializer = FullSupervisionTrackSerializer(queryset, many=True, context ={'request': request})
return Response(serializer.data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment