From 0307fbc595c7d6157c8d071f37bc49c8d8726d52 Mon Sep 17 00:00:00 2001 From: Matt Young Date: Mon, 20 Oct 2025 01:11:04 -0500 Subject: [PATCH] Block entry of a prelim score for an entry with any finals scores. --- app/Actions/Tabulation/EnterPrelimScore.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Actions/Tabulation/EnterPrelimScore.php b/app/Actions/Tabulation/EnterPrelimScore.php index b9e916f..76536e3 100644 --- a/app/Actions/Tabulation/EnterPrelimScore.php +++ b/app/Actions/Tabulation/EnterPrelimScore.php @@ -38,6 +38,11 @@ class EnterPrelimScore } $prelimDefinition = PrelimDefinition::where('audition_id', $entry->audition->id)->first(); + // Don't allow changes to prelims scores if the entry has a finals score + if ($entry->scoreSheets()->count() > 0) { + throw new AuditionAdminException('Cannot change prelims scores for an entry that has finals scores'); + } + // Check that the specified user is assigned to judge this entry in prelims $check = DB::table('room_user') ->where('user_id', $user->id)