]> git.parisson.com Git - teleforma.git/commitdiff
reverse webclass list
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Sun, 22 Jun 2025 21:41:28 +0000 (23:41 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Sun, 22 Jun 2025 21:41:28 +0000 (23:41 +0200)
teleforma/webclass/models.py

index c9caaaba051ed706827fe54f51cbbb1568668874..844888b5271f99c94b67c37295487eab4ce440b8 100644 (file)
@@ -101,7 +101,7 @@ def get_records_from_bbb(**kwargs):
 
             data['duration'] = data['end'] - data['start']
             records.append(data)
-    records = sorted(records, key=lambda r: r['start'])
+    records = sorted(records, key=lambda r: r['start'], reverse=True)
     return records
 
 
@@ -122,7 +122,7 @@ def get_records(period_id=None, course_id=None, rooms=None, recording_id=None):
     if not all_records:
         return []
 
-    all_records = sorted(all_records, key=lambda record: -record['start'])
+    all_records = sorted(all_records, key=lambda record: -record['start'], reverse=True)
     # for record in all_records:
     #     vocabulary.append((record['url'], record['start']))
     return all_records