fix scores per league
This commit is contained in:
parent
7fa013f713
commit
15a90d1f4c
1 changed files with 6 additions and 3 deletions
9
app.py
9
app.py
|
|
@ -227,12 +227,15 @@ def dashboard(username, week):
|
|||
for player_id in players_list:
|
||||
try:
|
||||
# Get player details from Sleeper API
|
||||
player = sleeper_api.get_player_info(player_id)
|
||||
if player:
|
||||
player_info = sleeper_api.get_player_info(player_id)
|
||||
if player_info:
|
||||
# Create a copy of the player object for this league to avoid shared references
|
||||
player = player_info.copy()
|
||||
|
||||
# Add starter status to player data
|
||||
player['is_starter'] = player_id in starters_list
|
||||
|
||||
# Add player points for this week
|
||||
# Add player points for this week (league-specific)
|
||||
player['points'] = players_points.get(player_id, 0.0)
|
||||
|
||||
# Check multiple possible injury status fields
|
||||
|
|
|
|||
Loading…
Reference in a new issue