Skip to content
Snippets Groups Projects
Commit 3e761e9a authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

[accounts] api patched GET List request to get also the ACCEPTED

accounts
parent cbe10bfe
No related branches found
No related tags found
1 merge request!224Security accounts
......@@ -88,7 +88,7 @@ class GodfatherListView(generics.ListAPIView):
#1) a new user requesting validation
#2) an existing validated user rejected by a previous supervisor
#On both 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)).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.ACCEPTED)).filter(Q(supervisee__profile__supervision_key=models.F('supervision_key')))
serializer = FullSupervisionTrackSerializer(queryset, many=True, context ={'request': request})
return Response(serializer.data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment