diff --git a/zwift_offline.py b/zwift_offline.py index 007d85f5..9e13da27 100644 --- a/zwift_offline.py +++ b/zwift_offline.py @@ -1283,8 +1283,7 @@ def api_users_login(): levels = [x for x in economy_config['cycling_levels'] if x['level'] >= current_level] if len(levels) > 1 and profile.total_xp > levels[1]['xp']: offset = profile.total_xp - levels[0]['xp'] - levels = [x for x in economy_config['cycling_levels'] if x['xp'] <= profile.total_xp] - transition_end = levels[-1]['level'] + transition_end = [x for x in levels if x['xp'] <= profile.total_xp][-1]['level'] for level in economy_config['cycling_levels']: if level['level'] >= current_level: level['xp'] += offset