Fix monthly hosting Sum bug

This commit is contained in:
Tanner Collin 2023-07-15 19:12:11 +00:00
parent 4b12ea0d6d
commit e2f9403466

View File

@ -1830,7 +1830,7 @@ class HostingViewSet(Base):
members = models.Member.objects.all()
members = members.annotate(
hosting_hours=Max('user__hosting__hours', filter=Q(user__hosting__finished_at__gte=current_month_start)),
hosting_hours=Sum('user__hosting__hours', filter=Q(user__hosting__finished_at__gte=current_month_start)),
).exclude(hosting_hours__isnull=True).order_by('-hosting_hours')
scores = []