deleting a score will clear cached scores
This commit is contained in:
parent
0d19b87715
commit
4528793303
|
|
@ -22,6 +22,7 @@ class ScoreController extends Controller
|
||||||
|
|
||||||
public function destroyScore(ScoreSheet $score)
|
public function destroyScore(ScoreSheet $score)
|
||||||
{
|
{
|
||||||
|
CalculatedScore::where('entry_id', $score->entry_id)->delete();
|
||||||
if ($score->entry->audition->hasFlag('seats_published')) {
|
if ($score->entry->audition->hasFlag('seats_published')) {
|
||||||
return redirect()->back()->with('error', 'Cannot delete scores for an entry where seats are published');
|
return redirect()->back()->with('error', 'Cannot delete scores for an entry where seats are published');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue