Skip to content

Commit

Permalink
Merge pull request #39 from hacf-fr/29-non-récupération-de-certaines-…
Browse files Browse the repository at this point in the history
…valeurs-grades-evaluations-absences-etc

Fix issue when data not found
  • Loading branch information
Giga77 authored Oct 5, 2024
2 parents 0e54aa7 + fbba483 commit 3767a1b
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 3767a1b

Please sign in to comment.