]> git.parisson.com Git - teleforma.git/commitdiff
Now authorize elearning students to have an appointment in person : https://trackers...
authorYoan Le Clanche <yoanl@pilotsystems.net>
Thu, 4 Nov 2021 12:52:25 +0000 (13:52 +0100)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Thu, 4 Nov 2021 12:52:25 +0000 (13:52 +0100)
teleforma/models/appointment.py
teleforma/views/appointment.py

index d3c5df6f6e58bdbe6024f10e74d608f6e9a5b831..ea7ba83f153d186d03606c527d316e830e78e8e4 100644 (file)
@@ -79,7 +79,7 @@ class AppointmentPeriod(models.Model):
         today = datetime.date.today()
         queryset = AppointmentSlot.objects.filter(appointment_period=self).order_by('-date')
         if platform_only:
-            queryset = queryset.filter(mode='distance', allow_elearning=True)
+            queryset = queryset.filter(allow_elearning=True)
         else:
             queryset = queryset.filter(allow_presentiel=True)
         for slot in queryset:
index ce15c98b5b85ac90bd79694e26fb089adc340ba9..50f8ee56bbf4c3b7a8a0767aff8b2922afd893ec 100644 (file)
@@ -42,11 +42,11 @@ class Appointments(View):
             if ap_period.is_open:
                 modes = ap_period.modes
                 # platformonly student can't subscribe to presentiel appointments
-                if platform_only:
-                    try:
-                        modes.remove(('presentiel', 'Presentiel'))
-                    except KeyError:
-                        pass
+                if platform_only:
+                    try:
+                        modes.remove(('presentiel', 'Presentiel'))
+                    except KeyError:
+                        pass
                 ap_periods.append({
                     'days':ap_period.days(platform_only),
                     'name': ap_period.name,