diff --git a/custom_components/ecole_directe/ecole_directe_helper.py b/custom_components/ecole_directe/ecole_directe_helper.py index 1f464f0..68a5931 100644 --- a/custom_components/ecole_directe/ecole_directe_helper.py +++ b/custom_components/ecole_directe/ecole_directe_helper.py @@ -534,10 +534,10 @@ def get_grade(data): "out_of": data.get("noteSur").replace(".", ","), "default_out_of": data.get("noteSur").replace(".", ","), "grade_out_of": data.get("valeur") + "/" + data.get("noteSur"), - "coefficient": data.get("coef").replace(".", ","), - "class_average": data.get("moyenneClasse").replace(".", ","), - "max": str(data.get("maxClasse")).replace(".", ","), - "min": str(data.get("minClasse")).replace(".", ","), + "coefficient": (data.get("coef") or "").replace(".", ","), + "class_average": (data.get("moyenneClasse") or "").replace(".", ","), + "max": str(data.get("maxClasse") or "").replace(".", ","), + "min": str(data.get("minClasse") or "").replace(".", ","), "is_bonus": "", "is_optionnal": "", "is_out_of_20": "",