From 0ef688071defbc3548575affa6f388734c0d1ea8 Mon Sep 17 00:00:00 2001 From: nprasad2077 <114438461+nprasad2077@users.noreply.github.com> Date: Sat, 22 Apr 2023 18:17:51 -0500 Subject: [PATCH] update views to serve data proper --- nba_data/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nba_data/views.py b/nba_data/views.py index 3bc911c..1eb531d 100644 --- a/nba_data/views.py +++ b/nba_data/views.py @@ -65,12 +65,12 @@ class ThreeTwoTopPointTrends(APIView): for season in seasons: season_data = PlayerData.objects.filter(season=season) avg_three_made = season_data.aggregate(Avg('three_fg'))[ - 'three_fg_avg'] + 'three_fg__avg'] avg_three_attempts = season_data.aggregate(Avg('three_attempts'))[ - 'three_attempts_avg'] - avg_two_made = season_data.aggregate(Avg('two_fg'))['two_fg_avg'] + 'three_attempts__avg'] + avg_two_made = season_data.aggregate(Avg('two_fg'))['two_fg__avg'] avg_two_attempts = season_data.aggregate(Avg('two_attempts'))[ - 'two_attempts_avg'] + 'two_attempts__avg'] data.append({ 'season': season,