Compare commits

..

No commits in common. "main" and "v2025.5.0" have entirely different histories.

2 changed files with 6 additions and 13 deletions

View File

@ -1 +1 @@
__version__ = "2025.6.1" __version__ = "2025.5.0"

View File

@ -20,9 +20,6 @@ class Command(BaseCommand):
help = "Compute submission scores from ratings" help = "Compute submission scores from ratings"
def add_arguments(self, parser): def add_arguments(self, parser):
parser.add_argument(
"-a", "--all", action="store_true", help="include frozen jurors"
)
parser.add_argument("event") parser.add_argument("event")
def handle(self, *args, **kwargs): def handle(self, *args, **kwargs):
@ -34,15 +31,11 @@ class Command(BaseCommand):
with scope(event=event): with scope(event=event):
submissions = {} submissions = {}
jurors = event.jurors.prefetch_related("ratings__submission").order_by( for juror in (
"token" event.jurors.prefetch_related("ratings__submission")
) .filter(frozen=False)
if not kwargs["all"]: .order_by("token")
jurors = jurors.filter(frozen=False) ):
self.stderr.write(f"computing scores from {jurors.count()} jurors")
for juror in jurors:
ratings = list( ratings = list(
juror.ratings.exclude(rating="").order_by("submission__created") juror.ratings.exclude(rating="").order_by("submission__created")
) )