]> git.parisson.com Git - teleforma.git/commitdiff
Fixed jury collision between periods
authorGael Le Mignot <gael@pilotsystems.net>
Fri, 27 Oct 2023 08:52:57 +0000 (10:52 +0200)
committerGael Le Mignot <gael@pilotsystems.net>
Fri, 27 Oct 2023 08:52:57 +0000 (10:52 +0200)
teleforma/models/appointment.py

index ea7ba83f153d186d03606c527d316e830e78e8e4..018348e8509953eb87978d56d0764e1fffc8f9a7 100644 (file)
@@ -220,7 +220,8 @@ class AppointmentSlot(models.Model):
     def nb_jurys_to_show(self):
         min = 100
 
-        for groupslot in AppointmentSlot.objects.filter(date=self.date, mode=self.mode).all():
+        for groupslot in AppointmentSlot.objects.filter(date=self.date, mode=self.mode,
+                                                        appointment_period = self.appointment_period).all():
             for slot in groupslot.slots:
                 for i, jury in enumerate(slot['jurys']):
                     if jury['available']: