diff options
-rw-r--r-- | bot/exts/christmas/advent_of_code/_helpers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/christmas/advent_of_code/_helpers.py b/bot/exts/christmas/advent_of_code/_helpers.py index e84348cb..f4a20955 100644 --- a/bot/exts/christmas/advent_of_code/_helpers.py +++ b/bot/exts/christmas/advent_of_code/_helpers.py @@ -123,8 +123,9 @@ def _parse_raw_leaderboard_data(raw_leaderboard_data: dict) -> dict: # Create summary stats for the stars completed for each day of the event. daily_stats = {} for day in range(1, 26): - star_one = len(star_results.get((day, 1), [])) - star_two = len(star_results.get((day, 1), [])) + day = str(day) + star_one = len(star_results.get((day, "1"), [])) + star_two = len(star_results.get((day, "2"), [])) # By using a dictionary instead of namedtuple here, we can serialize # this data to JSON in order to cache it in Redis. daily_stats[day] = {"star_one": star_one, "star_two": star_two} |