From a81f8e9679b051b483cc657651d8a6900f16796e Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 9 Oct 2023 15:48:00 +0200 Subject: [PATCH] =?UTF-8?q?VisualisationAssiduitesGroupe:=20supprime=20col?= =?UTF-8?q?.=20'Pr=C3=A9sences=20justifi=C3=A9es'.=20Fix=20#787?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/tables/visu_assiduites.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/tables/visu_assiduites.py b/app/tables/visu_assiduites.py index 82ba0368..4ccbae8f 100644 --- a/app/tables/visu_assiduites.py +++ b/app/tables/visu_assiduites.py @@ -105,12 +105,13 @@ class RowAssi(tb.Row): stats = self._get_etud_stats(etud) for key, value in stats.items(): self.add_cell(key, value[0], f"{value[1] - value[2]}", "assi_stats") - self.add_cell( - key + "_justi", - value[0] + " Justifiées", - f"{value[2]}", - "assi_stats", - ) + if key != "present": + self.add_cell( + key + "_justi", + value[0] + " Justifiées", + f"{value[2]}", + "assi_stats", + ) compte_justificatifs = scass.filter_by_date( etud.justificatifs, Justificatif, self.dates[0], self.dates[1] @@ -128,6 +129,7 @@ class RowAssi(tb.Row): ) def _get_etud_stats(self, etud: Identite) -> dict[str, list[str, float, float]]: + # XXX TODO @iziram commentaire sur la fonction et la var. retour retour: dict[str, tuple[str, float, float]] = { "present": ["Présences", 0.0, 0.0], "retard": ["Retards", 0.0, 0.0],