ChenyuRabbitLove commited on
Commit
38482e4
1 Parent(s): b2171a6

fix: add condition in delete routine checker

Browse files
Files changed (1) hide show
  1. utils/utils.py +2 -1
utils/utils.py CHANGED
@@ -99,7 +99,8 @@ def get_player_achievements(player_info: gr.State) -> List[str]:
99
  rewards_status = json.loads(player_info["rewards_status"])
100
  else:
101
  rewards_status = player_info["rewards_status"]
102
- del rewards_status["routine_checker"]
 
103
  return [
104
  (
105
  achivement_name_map[achievement_key],
 
99
  rewards_status = json.loads(player_info["rewards_status"])
100
  else:
101
  rewards_status = player_info["rewards_status"]
102
+ if "routine_checker" in rewards_status:
103
+ del rewards_status["routine_checker"]
104
  return [
105
  (
106
  achivement_name_map[achievement_key],