diff --git a/app/scodoc/sco_bulletins.py b/app/scodoc/sco_bulletins.py index 6d9cee9e5d..1596a11fb8 100644 --- a/app/scodoc/sco_bulletins.py +++ b/app/scodoc/sco_bulletins.py @@ -945,7 +945,7 @@ def formsemestre_bulletinetud( )[0] if format not in {"html", "pdfmail"}: - filename = scu.bul_filename(formsemestre, etud, format) + filename = scu.bul_filename(formsemestre, etud) mime, suffix = scu.get_mime_suffix(format) return scu.send_file(bulletin, filename, mime=mime, suffix=suffix) elif format == "pdfmail": diff --git a/app/scodoc/sco_cursus_dut.py b/app/scodoc/sco_cursus_dut.py index 007c602c5d..e3bbe0f67d 100644 --- a/app/scodoc/sco_cursus_dut.py +++ b/app/scodoc/sco_cursus_dut.py @@ -969,7 +969,7 @@ def do_formsemestre_validate_ue( if (code == ADM) and (moy_ue is None): # stocke la moyenne d'UE capitalisée: ue_status = nt.get_etud_ue_status(etudid, ue_id) - moy_ue = ue_status["moy"] if ue_status else "" + args["moy_ue"] = ue_status["moy"] if ue_status else "" log("formsemestre_validate_ue: create %s" % args) if code is not None: diff --git a/app/scodoc/sco_groups.py b/app/scodoc/sco_groups.py index e256014573..932c014a68 100644 --- a/app/scodoc/sco_groups.py +++ b/app/scodoc/sco_groups.py @@ -1523,7 +1523,7 @@ def create_etapes_partition(formsemestre_id, partition_name="apo_etapes"): ) partition: Partition = db.session.get(Partition, pid) groups = partition.groups - groups_by_names = {g["group_name"]: g for g in groups} + groups_by_names = {g.group_name: g for g in groups} for etape in etapes: if etape not in groups_by_names: new_group = create_group(pid, etape) diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index 17dd909f8f..6208c16e1b 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -838,10 +838,10 @@ def bul_filename_old(sem: dict, etud: dict, format): return filename -def bul_filename(formsemestre, etud, format): - """Build a filename for this bulletin""" +def bul_filename(formsemestre, etud): + """Build a filename for this bulletin (without suffix)""" dt = time.strftime("%Y-%m-%d") - filename = f"bul-{formsemestre.titre_num()}-{dt}-{etud.nom}.{format}" + filename = f"bul-{formsemestre.titre_num()}-{dt}-{etud.nom}" filename = make_filename(filename) return filename