update views to serve data proper

This commit is contained in:
nprasad2077 committed 2023-04-22 18:17:51 -05:00
1 parent c9711ddd19
commit 0ef688071d
1 file changed
+4 -4
+4 -4
View File
@@ -65,12 +65,12 @@ class ThreeTwoTopPointTrends(APIView):
for season in seasons: for season in seasons:
season_data = PlayerData.objects.filter(season=season) season_data = PlayerData.objects.filter(season=season)
avg_three_made = season_data.aggregate(Avg('three_fg'))[ avg_three_made = season_data.aggregate(Avg('three_fg'))[
'three_fg_avg'] 'three_fg__avg']
avg_three_attempts = season_data.aggregate(Avg('three_attempts'))[ avg_three_attempts = season_data.aggregate(Avg('three_attempts'))[
'three_attempts_avg'] 'three_attempts__avg']
avg_two_made = season_data.aggregate(Avg('two_fg'))['two_fg_avg'] avg_two_made = season_data.aggregate(Avg('two_fg'))['two_fg__avg']
avg_two_attempts = season_data.aggregate(Avg('two_attempts'))[ avg_two_attempts = season_data.aggregate(Avg('two_attempts'))[
'two_attempts_avg'] 'two_attempts__avg']
data.append({ data.append({
'season': season, 'season': season,