From baccf122fe466c2a26f73b578b908b206aef8fb9 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 23 Jun 2022 09:37:35 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20cl=C3=A9=20de=20tri=20des=20=C3=A9tudian?= =?UTF-8?q?ts=20(caract=C3=A8res=20sp=C3=A9ciaux)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/etudiants.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/etudiants.py b/app/models/etudiants.py index 6c9504e24..21b3a6384 100644 --- a/app/models/etudiants.py +++ b/app/models/etudiants.py @@ -135,8 +135,10 @@ class Identite(db.Model): def sort_key(self) -> tuple: "clé pour tris par ordre alphabétique" return ( - scu.suppress_accents(self.nom_usuel or self.nom or "").lower(), - scu.suppress_accents(self.prenom or "").lower(), + scu.sanitize_string( + scu.suppress_accents(self.nom_usuel or self.nom or "").lower() + ), + scu.sanitize_string(scu.suppress_accents(self.prenom or "").lower()), ) def get_first_email(self, field="email") -> str: