deleting a score will clear cached scores

This commit is contained in:
Matt Young 2024-10-31 09:15:08 -05:00
parent 0d19b87715
commit 4528793303
1 changed files with 1 additions and 0 deletions

View File

@ -22,6 +22,7 @@ class ScoreController extends Controller
public function destroyScore(ScoreSheet $score)
{
CalculatedScore::where('entry_id', $score->entry_id)->delete();
if ($score->entry->audition->hasFlag('seats_published')) {
return redirect()->back()->with('error', 'Cannot delete scores for an entry where seats are published');
}