Block entry of a prelim score for an entry with any finals scores.
This commit is contained in:
parent
30cbaf69f8
commit
0307fbc595
|
|
@ -38,6 +38,11 @@ class EnterPrelimScore
|
||||||
}
|
}
|
||||||
$prelimDefinition = PrelimDefinition::where('audition_id', $entry->audition->id)->first();
|
$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 that the specified user is assigned to judge this entry in prelims
|
||||||
$check = DB::table('room_user')
|
$check = DB::table('room_user')
|
||||||
->where('user_id', $user->id)
|
->where('user_id', $user->id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue