Skip to content

Commit

Permalink
Fix issue when data not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Giga77 committed Oct 5, 2024
1 parent 0e54aa7 commit fbba483
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/ecole_directe/ecole_directe_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down

0 comments on commit fbba483

Please sign in to comment.