Fix: tri tables

This commit is contained in:
Emmanuel Viennet 2023-02-25 11:33:28 +01:00 committed by iziram
parent 9264ac7b31
commit 1a6aa269ee

View File

@ -108,9 +108,9 @@ class TableRecap(tb.Table):
# Tri par rang croissant # Tri par rang croissant
if not res.formsemestre.block_moyenne_generale: 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: 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, ...) # Lignes footer (min, max, ects, apo, ...)
self.add_bottom_rows(ues_sans_bonus) self.add_bottom_rows(ues_sans_bonus)