From: Yoan Le Clanche Date: Thu, 4 Nov 2021 12:52:25 +0000 (+0100) Subject: Now authorize elearning students to have an appointment in person : https://trackers... X-Git-Tag: 2.5.0~8^2~2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=bf1a765a823b4d5c40194d1cf531e453120a60b4;p=teleforma.git Now authorize elearning students to have an appointment in person : https://trackers.pilotsystems.net/prebarreau/0281 --- diff --git a/teleforma/models/appointment.py b/teleforma/models/appointment.py index d3c5df6f..ea7ba83f 100644 --- a/teleforma/models/appointment.py +++ b/teleforma/models/appointment.py @@ -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: diff --git a/teleforma/views/appointment.py b/teleforma/views/appointment.py index ce15c98b..50f8ee56 100644 --- a/teleforma/views/appointment.py +++ b/teleforma/views/appointment.py @@ -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,