From 0b9c9be222f95828e252f4fe1d37efe087e7a721 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 16 Jan 2023 15:53:31 -0300 Subject: [PATCH] =?UTF-8?q?Fix:=20list=5Fbut=5Fue=5Finscriptions=20si=20au?= =?UTF-8?q?cun=20=C3=A9tudiant.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_moduleimpl_inscriptions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_moduleimpl_inscriptions.py b/app/scodoc/sco_moduleimpl_inscriptions.py index 101de24d..ecbcc90b 100644 --- a/app/scodoc/sco_moduleimpl_inscriptions.py +++ b/app/scodoc/sco_moduleimpl_inscriptions.py @@ -505,7 +505,11 @@ def _list_but_ue_inscriptions(res: NotesTableCompat, read_only: bool = True) -> """ ] 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( (UniteEns.query.get(ue_id) for ue_id in ue_ids), key=lambda u: (u.numero or 0, u.acronyme),