Skip to content

Commit

Permalink
Change score calculation from Sum to Avg in ReviewSessionAdmin (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
estyxx authored Feb 8, 2025
1 parent 320a4aa commit 073383e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/reviews/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from django import forms
from django.contrib import admin, messages
from django.db.models import Count, F, OuterRef, Prefetch, Subquery, Sum
from django.db.models import Count, F, OuterRef, Prefetch, Subquery, Sum, Avg
from django.http.request import HttpRequest
from django.shortcuts import redirect
from django.template.response import TemplateResponse
Expand Down Expand Up @@ -433,7 +433,7 @@ def _review_proposals_recap_view(self, request, review_session):
proposal_id=OuterRef("id"),
)
.values("proposal_id")
.annotate(score=Sum("score__numeric_value"))
.annotate(score=Avg("score__numeric_value"))
.values("score")
)
)
Expand Down

0 comments on commit 073383e

Please sign in to comment.