Skip to content

Commit

Permalink
Fix bug when parsing position of a user with 0 points and position empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ctmbl committed Oct 18, 2023
1 parent 88905fb commit 733c71a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/classes/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def parse_rootme_user_data(data):
idx = int(data["id_auteur"])
username = data["nom"]
score = int(data["score"])
rank = int(data["position"])
_rank = data["position"]
rank = int(_rank) if _rank != "" else 9999999
nb_solves = len(data["validations"])

keys = User.keys()
Expand Down

0 comments on commit 733c71a

Please sign in to comment.