chuni: fixed missing login boni IndexError

This commit is contained in:
Dniel97 2023-03-30 22:58:45 +02:00
parent 571a691e0e
commit a60d52b742
Signed by untrusted user: Dniel97
GPG Key ID: 6180B3C768FB2E08

View File

@ -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