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)