Skip to content

Commit

Permalink
fix: challenges progression
Browse files Browse the repository at this point in the history
  • Loading branch information
MalikAza committed Jul 15, 2024
1 parent c7b89ea commit 9ab35af
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pyZUnivers/challenges.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ class _ChallengeAtrb:

def __init__(self, payload) -> None:
self.__challenge_item = payload['challenge']
achieved = payload['challengeLog']
progress = payload['progress']
try:
achieved = payload['challengeLog']
except KeyError:
achieved = None
try:
progress = payload['progress']
except KeyError:
progress = None

self.progress = '0/1'
self.achieved_date = None
Expand Down

0 comments on commit 9ab35af

Please sign in to comment.