From a60d52b7422b639ca982e63b07c0e8b5508bef2e Mon Sep 17 00:00:00 2001 From: Dniel97 Date: Thu, 30 Mar 2023 22:58:45 +0200 Subject: [PATCH] chuni: fixed missing login boni IndexError --- titles/chuni/base.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/titles/chuni/base.py b/titles/chuni/base.py index d41d415..0eaabff 100644 --- a/titles/chuni/base.py +++ b/titles/chuni/base.py @@ -69,7 +69,13 @@ class ChuniBase: self.version, preset["id"] ) - # assume its not None + # skip the current bonus preset if no boni were found + if all_login_boni is None or len(all_login_boni) < 1: + self.logger.warn( + f"No bonus entries found for bonus preset {preset['id']}" + ) + continue + max_needed_days = all_login_boni[0]["needLoginDayCount"] # make sure to not show login boni after all days got redeemed