diff --git a/pretalx_musicrate/__init__.py b/pretalx_musicrate/__init__.py index e3fccb9..caac68a 100644 --- a/pretalx_musicrate/__init__.py +++ b/pretalx_musicrate/__init__.py @@ -1 +1 @@ -__version__ = "2025.1.0" +__version__ = "2025.2.0.dev0" diff --git a/pretalx_musicrate/views.py b/pretalx_musicrate/views.py index 1836b42..64b0020 100644 --- a/pretalx_musicrate/views.py +++ b/pretalx_musicrate/views.py @@ -16,7 +16,7 @@ from django.views.generic.detail import SingleObjectMixin from django_context_decorator import context from pretalx.common.views.mixins import EventPermissionRequired from pretalx.orga.views.submission import BaseSubmissionList, SubmissionList -from pretalx.submission.models import Submission +from pretalx.submission.models import Submission, SubmissionStates from .forms import ( AssigneeForm, @@ -61,7 +61,8 @@ class JoinView(TemplateView): self.juror.last_submission or self.request.event.pretalx_musicrate_settings.last_submission or self.request.event.submissions.filter( - submission_type__in=self.request.event.pretalx_musicrate_settings.submission_types.all() + submission_type__in=self.request.event.pretalx_musicrate_settings.submission_types.all(), + state=SubmissionStates.SUBMITTED, ) .order_by("created") .first() @@ -87,7 +88,8 @@ class JoinView(TemplateView): self.juror.last_submission or self.request.event.pretalx_musicrate_settings.last_submission or self.request.event.submissions.filter( - submission_type__in=self.request.event.pretalx_musicrate_settings.submission_types.all() + submission_type__in=self.request.event.pretalx_musicrate_settings.submission_types.all(), + state=SubmissionStates.SUBMITTED, ) .order_by("created") .first() @@ -143,7 +145,8 @@ class QRCodeView(EventPermissionRequired, TemplateView): context["last_submission"] = ( self.request.event.pretalx_musicrate_settings.last_submission or self.request.event.submissions.filter( - submission_type__in=self.request.event.pretalx_musicrate_settings.submission_types.all() + submission_type__in=self.request.event.pretalx_musicrate_settings.submission_types.all(), + state=SubmissionStates.SUBMITTED, ) .order_by("created") .first() @@ -157,7 +160,8 @@ class SubmissionMixin(SingleObjectMixin): def get_queryset(self): return self.request.event.submissions.prefetch_related("answers").filter( - submission_type__in=self.request.event.pretalx_musicrate_settings.submission_types.all() + submission_type__in=self.request.event.pretalx_musicrate_settings.submission_types.all(), + state=SubmissionStates.SUBMITTED, ) @context @@ -410,7 +414,8 @@ class ExportView(EventPermissionRequired, View): request.event.submissions.prefetch_related("answers") .select_related("submission_type") .filter( - submission_type__in=request.event.pretalx_musicrate_settings.submission_types.all() + submission_type__in=request.event.pretalx_musicrate_settings.submission_types.all(), + state=SubmissionStates.SUBMITTED, ) .only("title", "submission_type__name") .order_by("created")