diff --git a/pretalx_musicrate/__init__.py b/pretalx_musicrate/__init__.py index d362d01..b80dbc3 100644 --- a/pretalx_musicrate/__init__.py +++ b/pretalx_musicrate/__init__.py @@ -1 +1 @@ -__version__ = "2025.2.0" +__version__ = "2025.3.0.dev0" diff --git a/pretalx_musicrate/views.py b/pretalx_musicrate/views.py index e76234f..4ded69a 100644 --- a/pretalx_musicrate/views.py +++ b/pretalx_musicrate/views.py @@ -39,15 +39,14 @@ def get_last_submission(settings, submissions, submission=None): if submission is not None and submission.state != SubmissionStates.SUBMITTED: submission = None - return ( - submission - or submissions.filter( - submission_type__in=settings.submission_types.all(), - state=SubmissionStates.SUBMITTED, - ) - .order_by("created") - .first() + submissions = submissions.filter( + submission_type__in=settings.submission_types.all(), + state=SubmissionStates.SUBMITTED, ) + if submission is not None and not submissions.filter(pk=submission.pk).exists(): + submission = None + + return submission or submissions.order_by("created").first() class JoinView(TemplateView):