]> git.parisson.com Git - teleforma.git/commitdiff
Fix bad queryset
authortest test <yoanl@pilotsystems.net>
Thu, 27 May 2021 15:14:53 +0000 (17:14 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Thu, 27 May 2021 15:14:53 +0000 (17:14 +0200)
teleforma/views/crfpa.py

index b9e8268d557756e69f16257568baddb447921e8e..7497d2087b9ae957c6805d219133ae1289281dea 100644 (file)
@@ -679,9 +679,9 @@ class AnnalsView(ListView):
             self.student = students[0]
             docs = Document.objects.filter(is_annal=True).filter(Q(iej=self.student.iej) | Q(iej=None)).order_by('-annal_year')
         if iej:
-            docs = docs.filter(iej=iej)
+            docs = docs.filter(iej=iej[0])
         if course:
-            docs = docs.filter(course=course)
+            docs = docs.filter(course=course[0])
 
         for doc in docs:
             if doc.course in courses: