Jon Solow commited on
Commit
9479268
·
1 Parent(s): 04676e0

Add line break if no players in slot

Browse files
src/pages/80_Maximum_Roster_Strategy.py CHANGED
@@ -66,7 +66,10 @@ def get_tier_div(tier_str: str | int, tier_num: str | int) -> str:
66
 
67
 
68
  def get_player_container(df_players: pd.DataFrame, slot_number: int | str) -> str:
69
- player_code_str = "\n".join(df_players.apply(get_player_grid_div, axis=1).tolist())
 
 
 
70
  return f"""<div class="playerslot{slot_number} playerslot">{player_code_str}</div>"""
71
 
72
 
 
66
 
67
 
68
  def get_player_container(df_players: pd.DataFrame, slot_number: int | str) -> str:
69
+ if len(df_players) == 0:
70
+ player_code_str = "<br>"
71
+ else:
72
+ player_code_str = "\n".join(df_players.apply(get_player_grid_div, axis=1).tolist())
73
  return f"""<div class="playerslot{slot_number} playerslot">{player_code_str}</div>"""
74
 
75