Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Giga77 committed Nov 23, 2024
2 parents f9378cb + d0dd5bb commit ac8d826
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions custom_components/ecole_directe/ecole_directe_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def get_ecoledirecte_session(data, config_path, hass) -> EDSession | None:
+ urllib.parse.quote(data["password"], safe="")
+ '", "isRelogin": false}'
)

login = get_response(
None,
f"{APIURL}/login.awp?v={APIVERSION}",
Expand Down Expand Up @@ -513,21 +514,11 @@ def get_grades_evaluations(token, eleve, annee_scolaire, config_path):
response["disciplines"] = get_disciplines_periode(periode_json)
if periode_json["ensembleMatieres"]:
response["moyenne_generale"] = {
"moyenneGenerale": periode_json.get(
["ensembleMatieres"]["moyenneGenerale"], ""
),
"moyenneClasse": periode_json.get(
["ensembleMatieres"]["moyenneClasse"], ""
),
"moyenneMin": periode_json.get(
["ensembleMatieres"]["moyenneMin"], ""
),
"moyenneMax": periode_json.get(
["ensembleMatieres"]["moyenneMax"], ""
),
"dateCalcul": periode_json.get(
["ensembleMatieres"]["dateCalcul"], ""
),
"moyenneGenerale": periode_json["ensembleMatieres"].get("moyenneGenerale", ""),
"moyenneClasse": periode_json["ensembleMatieres"].get("moyenneClasse", ""),
"moyenneMin": periode_json["ensembleMatieres"].get("moyenneMin", ""),
"moyenneMax": periode_json["ensembleMatieres"].get("moyenneMax", ""),
"dateCalcul": periode_json["ensembleMatieres"].get("dateCalcul", ""),
}

break
Expand Down

0 comments on commit ac8d826

Please sign in to comment.