From c652bbf2f6725fc7a9d000ff67c90d99c4ae8c87 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 16 Mar 2022 09:00:34 +0100 Subject: [PATCH] (Commit en retard) ECTS dans bul pdf --- app/but/bulletin_but_pdf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/but/bulletin_but_pdf.py b/app/but/bulletin_but_pdf.py index 4c271acc..ea4610cb 100644 --- a/app/but/bulletin_but_pdf.py +++ b/app/but/bulletin_but_pdf.py @@ -139,7 +139,12 @@ class BulletinGeneratorStandardBUT(BulletinGeneratorStandard): } rows.append(t) # 2eme ligne titre UE (bonus/malus/ects) - ects_txt = f'ECTS: {ue["ECTS"]["acquis"]:.3g} / {ue["ECTS"]["total"]:.3g}' + if "ECTS" in ue: + ects_txt = ( + f'ECTS: {ue["ECTS"]["acquis"]:.3g} / {ue["ECTS"]["total"]:.3g}' + ) + else: + ects_txt = "" t = { "titre": f"""Bonus: {ue['bonus']} - Malus: { ue["malus"]}""",