From 653305c9380a50fb58d85c579e1b4e00f839a5ee Mon Sep 17 00:00:00 2001 From: Matt Young Date: Thu, 31 Oct 2024 08:17:55 -0500 Subject: [PATCH] a judge entering a score will delete cached scores for that entry --- app/Actions/Tabulation/EnterScore.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Actions/Tabulation/EnterScore.php b/app/Actions/Tabulation/EnterScore.php index 4354ac3..407f4cb 100644 --- a/app/Actions/Tabulation/EnterScore.php +++ b/app/Actions/Tabulation/EnterScore.php @@ -7,6 +7,7 @@ namespace App\Actions\Tabulation; use App\Exceptions\ScoreEntryException; +use App\Models\CalculatedScore; use App\Models\Entry; use App\Models\ScoreSheet; use App\Models\User; @@ -24,6 +25,7 @@ class EnterScore */ public function __invoke(User $user, Entry $entry, array $scores, ScoreSheet|false $scoreSheet = false): ScoreSheet { + CalculatedScore::where('entry_id', $entry->id)->delete(); $scores = collect($scores); $this->basicChecks($user, $entry, $scores); $this->checkJudgeAssignment($user, $entry);