Fix vote teacher selection can be empty
This commit is contained in:
parent
4bf65a4d87
commit
78acebcd70
|
@ -143,6 +143,8 @@ module Backend
|
|||
def create_vote(context : Context, input : VoteCreateInput) : Vote
|
||||
context.student!
|
||||
|
||||
raise "Teacher selection can't be empty" if input.teacher_ids.empty?
|
||||
|
||||
skif = context.external.as(Db::Student).skif
|
||||
input.teacher_ids.each do |id|
|
||||
teacher = Db::Teacher.find(id)
|
||||
|
|
Loading…
Reference in a new issue