1
0
forked from ScoDoc/ScoDoc

Fix: jury BUT sur étudiant sans deca

This commit is contained in:
Emmanuel Viennet 2024-07-12 16:21:27 +02:00
parent 62e4481c77
commit 940dc2721a

View File

@ -156,7 +156,7 @@ def pvjury_table_but(
deca = None
ects_but_valides = but_ects_valides(etud, referentiel_competence_id)
has_diplome = deca.valide_diplome()
has_diplome = deca.valide_diplome() if deca else False
diplome_lst = ["ADM"] if has_diplome else []
validation_dut120 = ValidationDUT120.query.filter_by(
etudid=etudid, formsemestre_id=formsemestre.id
@ -181,8 +181,12 @@ def pvjury_table_but(
etudid=etud.id,
),
"cursus": _descr_cursus_but(etud),
"ects": f"""{deca.ects_annee():g}<br><br>Tot. {ects_but_valides:g}""",
"_ects_xls": deca.ects_annee(),
"ects": (
f"""{deca.ects_annee():g}<br><br>Tot. {ects_but_valides:g}"""
if deca
else ""
),
"_ects_xls": deca.ects_annee() if deca else "",
"ects_but": ects_but_valides,
"ues": deca.descr_ues_validation(line_sep=line_sep) if deca else "-",
"niveaux": (
@ -207,7 +211,7 @@ def pvjury_table_but(
"code_nip": etud.code_nip,
"code_ine": etud.code_ine,
}
if deca.valide_diplome() or not only_diplome:
if (deca and deca.valide_diplome()) or not only_diplome:
rows.append(row)
rows.sort(key=lambda x: x["_nom_pv_order"])