From 0afab38f6e5cb63b9fee3d22e15887357f7f9f63 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 10 Jul 2021 13:58:25 +0200 Subject: [PATCH] fix sort args --- app/scodoc/sco_moduleimpl_inscriptions.py | 2 +- app/scodoc/sco_pvjury.py | 2 +- app/scodoc/sco_report.py | 2 +- app/scodoc/sco_synchro_etuds.py | 2 +- app/views/notes.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/scodoc/sco_moduleimpl_inscriptions.py b/app/scodoc/sco_moduleimpl_inscriptions.py index afa944f6f..bc0dffab4 100644 --- a/app/scodoc/sco_moduleimpl_inscriptions.py +++ b/app/scodoc/sco_moduleimpl_inscriptions.py @@ -458,7 +458,7 @@ def _fmt_etud_set(context, ins, max_list_size=7): etuds = [] for etudid in ins: etuds.append(sco_etud.get_etud_info(etudid=etudid, filled=True)[0]) - etuds.sort(itemgetter("nom")) + etuds.sort(key=itemgetter("nom")) return ", ".join( [ '%(nomprenom)s' diff --git a/app/scodoc/sco_pvjury.py b/app/scodoc/sco_pvjury.py index 218931ee4..825be97d9 100644 --- a/app/scodoc/sco_pvjury.py +++ b/app/scodoc/sco_pvjury.py @@ -98,7 +98,7 @@ def _descr_decisions_ues(context, nt, etudid, decisions_ue, decision_sem): uelist.append(nt.get_etud_ue_status(etudid, ue["ue_id"])["ue"]) except KeyError: pass - uelist.sort(itemgetter("numero")) + uelist.sort(key=itemgetter("numero")) return uelist diff --git a/app/scodoc/sco_report.py b/app/scodoc/sco_report.py index 023fad4be..3f4c86323 100644 --- a/app/scodoc/sco_report.py +++ b/app/scodoc/sco_report.py @@ -911,7 +911,7 @@ def _descr_etud_set(context, etudids): for etudid in etudids: etuds.append(sco_etud.get_etud_info(etudid=etudid, filled=True)[0]) # sort by name - etuds.sort(itemgetter("nom")) + etuds.sort(key=itemgetter("nom")) return ", ".join([e["nomprenom"] for e in etuds]) diff --git a/app/scodoc/sco_synchro_etuds.py b/app/scodoc/sco_synchro_etuds.py index ef4c4ea8d..e088b5f9e 100644 --- a/app/scodoc/sco_synchro_etuds.py +++ b/app/scodoc/sco_synchro_etuds.py @@ -424,7 +424,7 @@ def list_synch(context, sem, anneeapogee=None): return etud etuds = [key2etud(x, etud_apo) for x in etudset] - etuds.sort(itemgetter("nom")) + etuds.sort(key=itemgetter("nom")) return etuds # diff --git a/app/views/notes.py b/app/views/notes.py index 7f41c03dc..d95d80206 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -1208,7 +1208,7 @@ def formsemestre_enseignants_list(context, REQUEST, formsemestre_id, format="htm sem_ens[ens]["_email_target"] = "mailto:%s" % sem_ens[ens]["email"] sem_ens_list = list(sem_ens.values()) - sem_ens_list.sort(itemgetter("nomprenom")) + sem_ens_list.sort(key=itemgetter("nomprenom")) # --- Generate page with table title = "Enseignants de " + sem["titremois"]