cas tables vides

This commit is contained in:
Emmanuel Viennet 2023-02-06 13:17:57 +01:00 committed by iziram
parent db58c57a78
commit 8ecdfd4e62
2 changed files with 6 additions and 7 deletions

View File

@ -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

View File

@ -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(