diff --git a/app/tables/recap.py b/app/tables/recap.py index 513c52b6..c50a65af 100644 --- a/app/tables/recap.py +++ b/app/tables/recap.py @@ -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)