]> git.parisson.com Git - teleforma.git/commitdiff
https://trackers.pilotsystems.net/prebarreau/0261 : still display webclass in course...
authorYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 13 Sep 2021 15:49:30 +0000 (17:49 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 13 Sep 2021 15:49:30 +0000 (17:49 +0200)
teleforma/webclass/forms.py
teleforma/webclass/models.py

index c7a7bc0c6db088fe78752ea73ed788f0cb148909..d452cada97e16cb68cef5ca0f1802c320712cd2a 100644 (file)
@@ -36,6 +36,8 @@ class WebclassRecordsForm(Form):
                 # for each bbb record for the current course, add an option to the field
 
                 for record in records:
+                    if not record['slot']:
+                        continue
                     webclass_slot = WebclassSlot.objects.get(
                         pk=record['slot'].id)
                     label = u"%s à %s - %s" % (record['start_date'].strftime(
index 3a9281b64d7c297cb196ba546c038fc5e0d26b92..a6567a27c669d065bef3da7c956f3af901e0e623 100644 (file)
@@ -72,7 +72,7 @@ def get_records_from_bbb(**kwargs):
                         pk=int(recording['metadata'].get('slotid', -1)))
                 except WebclassSlot.DoesNotExist:
                     # this happen if the slot is deleted in django admin
-                    continue
+                    pass
                 data.update({
                     'period_id': int(recording['metadata'].get('periodid', -1)),
                     'course_id': int(recording['metadata'].get('courseid', -1)),