Fix: tri tables

This commit is contained in:
Emmanuel Viennet 2023-02-25 11:33:28 +01:00
parent 66c41771f4
commit 24dc92e12a

View File

@ -107,9 +107,9 @@ class TableRecap(tb.Table):
# Tri par rang croissant
if not res.formsemestre.block_moyenne_generale:
self.sort_rows(key=lambda row: row.rang_order)
self.sort_rows(key=lambda row: row.rang_order or 10000000)
else:
self.sort_rows(key=lambda row: row.nb_ues_validables, reverse=True)
self.sort_rows(key=lambda row: row.nb_ues_validables or 0, reverse=True)
# Lignes footer (min, max, ects, apo, ...)
self.add_bottom_rows(ues_sans_bonus)