From 3e761e9ac259b9d458a0863cd5699b6e8100b2a2 Mon Sep 17 00:00:00 2001
From: Flavio Tarsetti <flavio.tarsetti@idiap.ch>
Date: Wed, 14 Jun 2017 17:56:17 +0200
Subject: [PATCH] [accounts] api patched GET List request to get also the
 ACCEPTED accounts

---
 beat/web/accounts/api.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/beat/web/accounts/api.py b/beat/web/accounts/api.py
index 46a0a76fc..0b20662be 100644
--- a/beat/web/accounts/api.py
+++ b/beat/web/accounts/api.py
@@ -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)
-- 
GitLab