Skip to content

Commit

Permalink
Update functions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-hsieh committed Oct 12, 2023
1 parent 2f0b55d commit d0298c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fantasy_app/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ def get_most_position_points(position, currentweek=0):
def order_positions_by_points(score_list):
sorted_list = sorted(score_list, key=operator.itemgetter(
'total_score'), reverse=True)

for i, member_dict in enumerate(sorted_list):
member_dict["rank"] = i + 1
# member_dict["rank"] = position + 1
return sorted_list


Expand Down

0 comments on commit d0298c6

Please sign in to comment.