]> 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>
Wed, 12 Apr 2023 09:40:55 +0000 (11:40 +0200)
teleforma/views/crfpa.py

index f7c5e6e4c0473dfcb7149423197675e3bf96b845..8ba8a44255fc4f3389fc8f9a1cdd2515d96426aa 100644 (file)
@@ -513,9 +513,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: