Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
Fixed bug that didn't display player bio by using correct index from player_page_info
  • Loading branch information
Kudzmat authored Jan 24, 2025
1 parent 32c5a42 commit d53ddd6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions nba_stats/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,7 @@ def player_graph(request, player_full_name, player_id, category):

if player_page_info:
player_headshot = player_page_info[0]
player_awards = player_page_info[1]
player_bio = player_page_info[2]
player_bio = player_page_info[1]
graph = player_page_info[3]

# Initialize forms
Expand All @@ -596,7 +595,6 @@ def player_graph(request, player_full_name, player_id, category):
context = {'player_form': player_form,
'player_headshot': player_headshot,
'player_full_name': player_full_name,
'player_awards': player_awards,
'player_bio': player_bio,
'graph': graph,
'player_id': player_id,
Expand All @@ -605,7 +603,6 @@ def player_graph(request, player_full_name, player_id, category):

return render(request, "nba_stats/player_graph.html", context=context)


def update_player_awards(request, player_id, player_name):
# Check if league leaders already exist for today
today = timezone.now().date()
Expand Down

0 comments on commit d53ddd6

Please sign in to comment.