Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Updated to correct the fact that if several grades were added to the …
Browse files Browse the repository at this point in the history
…same subject, only the last one would be kept.
  • Loading branch information
DimitriDR committed May 22, 2024
1 parent 77f7f16 commit ce356bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ def compare_old_and_new_marks(html_content, marks_data) -> tuple[dict, dict]:
for subject in marks:
# Si la matière n'est pas dans le fichier JSON, c'est qu'il y a une nouvelle note inédite
if subject not in marks_data["marks"]:
new_marks[subject] = {}
for test in marks[subject]:
new_marks[subject] = {test: marks[subject][test]} # On ajoute la note à la liste des nouvelles notes
break
new_marks[subject][test] = marks[subject][test] # On ajoute la note à la liste des nouvelles notes
else: # Sinon, on regarde les tests déjà présents par rapport aux nouvelles notes
for test in marks[subject]:
# Si le test n'est pas dans le fichier JSON, c'est qu'il y a une nouvelle note inédite
Expand Down

0 comments on commit ce356bc

Please sign in to comment.