1
0
forked from ScoDoc/ScoDoc

Fix: bul BUT malus non inscrit

This commit is contained in:
Emmanuel Viennet 2022-09-19 15:14:15 +02:00
parent 22f906e726
commit 950c0826b7
2 changed files with 13 additions and 5 deletions

View File

@ -195,10 +195,18 @@ class BulletinGeneratorStandardBUT(BulletinGeneratorStandard):
ects_txt = ""
# case Bonus/Malus/Rang "bmr"
fields_bmr = []
if float(ue["bonus"]) != 0:
try:
value = float(ue["bonus"])
if value != 0:
fields_bmr.append(f"Bonus: {ue['bonus']}")
if float(ue["malus"]) != 0:
except ValueError:
pass
try:
value = float(ue["malus"])
if value != 0:
fields_bmr.append(f"Malus: {ue['malus']}")
except ValueError:
pass
if self.preferences["bul_show_ue_rangs"]:
fields_bmr.append(
f"Rang: {ue['moyenne']['rang']} / {ue['moyenne']['total']}"

View File

@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
SCOVERSION = "9.3.39"
SCOVERSION = "9.3.40"
SCONAME = "ScoDoc"