diff --git a/app/scodoc/sco_bulletins_json.py b/app/scodoc/sco_bulletins_json.py index 5acfb59954..93e45e3c7a 100644 --- a/app/scodoc/sco_bulletins_json.py +++ b/app/scodoc/sco_bulletins_json.py @@ -189,10 +189,10 @@ def formsemestre_bulletinetud_published_dict( d["ue_capitalisee"] = [] for ue in ues: ue_status = nt.get_etud_ue_status(etudid, ue["ue_id"]) - try: - ects_txt = str(int(ue["ects"])) - except ValueError: + if ue["ects"] is None: ects_txt = "" + else: + ects_txt = f"{ue['ects']:2.3g}" u = dict( id=ue["ue_id"], numero=scu.quote_xml_attr(ue["numero"]),