From 50f1698195d058c9e4fb6066e1ecf63b9540e445 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 6 Feb 2023 13:17:57 +0100 Subject: [PATCH] cas tables vides --- app/tables/jury_recap.py | 11 +++++------ app/views/notes.py | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/tables/jury_recap.py b/app/tables/jury_recap.py index ce9620026..ba2d09c8c 100644 --- a/app/tables/jury_recap.py +++ b/app/tables/jury_recap.py @@ -57,11 +57,11 @@ class TableJury(TableRecap): # Stats jury: fréquence de chaque code enregistré self.freq_codes_annuels = collections.Counter() # Ajout colonnes spécifiques à la table jury: - - if self.res.is_apc: - self.add_rcues() - self.add_jury() - self.add_groups_header() + if self.rows: # non vide + if self.res.is_apc: + self.add_rcues() + self.add_jury() + self.add_groups_header() # Termine la table self.finalize() @@ -73,7 +73,6 @@ class TableJury(TableRecap): """ self.insert_group("rcue", before="col_ues_validables") for row in self.rows: - etud: Identite = row.etud deca = row.deca if deca.code_valide: self.freq_codes_annuels[deca.code_valide] += 1 diff --git a/app/views/notes.py b/app/views/notes.py index ce2f95b63..75f02ab6d 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -2802,7 +2802,7 @@ def formsemestre_saisie_jury(formsemestre_id: int, selected_etudid: int = None): read_only = not sco_permissions_check.can_validate_sem(formsemestre_id) formsemestre = FormSemestre.query.get_or_404(formsemestre_id) if formsemestre.formation.is_apc() and formsemestre.semestre_id % 2 == 0: - return jury_but_recap.formsemestre_saisie_jury_but( + return jury_recap.formsemestre_saisie_jury_but( formsemestre, read_only, selected_etudid=selected_etudid ) return redirect(