forked from ScoDoc/ScoDoc
Fix: jury BUT sur étudiant sans deca
This commit is contained in:
parent
62e4481c77
commit
940dc2721a
@ -156,7 +156,7 @@ def pvjury_table_but(
|
|||||||
deca = None
|
deca = None
|
||||||
|
|
||||||
ects_but_valides = but_ects_valides(etud, referentiel_competence_id)
|
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 []
|
diplome_lst = ["ADM"] if has_diplome else []
|
||||||
validation_dut120 = ValidationDUT120.query.filter_by(
|
validation_dut120 = ValidationDUT120.query.filter_by(
|
||||||
etudid=etudid, formsemestre_id=formsemestre.id
|
etudid=etudid, formsemestre_id=formsemestre.id
|
||||||
@ -181,8 +181,12 @@ def pvjury_table_but(
|
|||||||
etudid=etud.id,
|
etudid=etud.id,
|
||||||
),
|
),
|
||||||
"cursus": _descr_cursus_but(etud),
|
"cursus": _descr_cursus_but(etud),
|
||||||
"ects": f"""{deca.ects_annee():g}<br><br>Tot. {ects_but_valides:g}""",
|
"ects": (
|
||||||
"_ects_xls": deca.ects_annee(),
|
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,
|
"ects_but": ects_but_valides,
|
||||||
"ues": deca.descr_ues_validation(line_sep=line_sep) if deca else "-",
|
"ues": deca.descr_ues_validation(line_sep=line_sep) if deca else "-",
|
||||||
"niveaux": (
|
"niveaux": (
|
||||||
@ -207,7 +211,7 @@ def pvjury_table_but(
|
|||||||
"code_nip": etud.code_nip,
|
"code_nip": etud.code_nip,
|
||||||
"code_ine": etud.code_ine,
|
"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.append(row)
|
||||||
|
|
||||||
rows.sort(key=lambda x: x["_nom_pv_order"])
|
rows.sort(key=lambda x: x["_nom_pv_order"])
|
||||||
|
Loading…
Reference in New Issue
Block a user