Jon Solow commited on
Commit
80cfc94
·
1 Parent(s): 3894ea2

Fix logic for showing gametime_str to avoid mypy error if nonetype

Browse files
Files changed (1) hide show
  1. src/load_options.py +5 -1
src/load_options.py CHANGED
@@ -81,7 +81,11 @@ def display_player(player_opt: PlayerOption | None):
81
  st.image(player_opt.headshot_url)
82
  if player_opt.full_name:
83
  st.write(player_opt.full_name)
84
- st.write(f"{player_opt.team} - {player_opt.gametime.strftime('%-m/%-d %-I:%M %p')}")
 
 
 
 
85
 
86
 
87
  @st.cache_data(ttl=60 * 60 * 24)
 
81
  st.image(player_opt.headshot_url)
82
  if player_opt.full_name:
83
  st.write(player_opt.full_name)
84
+ if player_opt.gametime:
85
+ gametime_str = player_opt.gametime.strftime("%-m/%-d %-I:%M %p")
86
+ else:
87
+ gametime_str = ""
88
+ st.write(f"{player_opt.team} - {gametime_str}")
89
 
90
 
91
  @st.cache_data(ttl=60 * 60 * 24)