Fix: list_but_ue_inscriptions si aucun étudiant.

This commit is contained in:
Emmanuel Viennet 2023-01-16 15:53:31 -03:00 committed by iziram
parent b5cf210112
commit 0b9c9be222

View File

@ -505,7 +505,11 @@ def _list_but_ue_inscriptions(res: NotesTableCompat, read_only: bool = True) ->
""" """
] ]
table_inscr = _table_but_ue_inscriptions(res) table_inscr = _table_but_ue_inscriptions(res)
ue_ids = set.union(*(set(x.keys()) for x in table_inscr.values())) ue_ids = (
set.union(*(set(x.keys()) for x in table_inscr.values()))
if table_inscr
else set()
)
ues = sorted( ues = sorted(
(UniteEns.query.get(ue_id) for ue_id in ue_ids), (UniteEns.query.get(ue_id) for ue_id in ue_ids),
key=lambda u: (u.numero or 0, u.acronyme), key=lambda u: (u.numero or 0, u.acronyme),