competition: fix edit competition team api

dev_sync_trustie
p31729568 5 years ago
parent 803d9d5d7d
commit 5f5cf67d5e

@ -86,6 +86,7 @@ class Competitions::SaveTeamForm
# 创建者是否能多次报名
def check_creator_multiple_enrollable
return unless team.new_record? # 编辑战队时不需要校验
return unless competition.enrolled?(creator)
if (creator.is_teacher? && competition.teacher_multiple_limited?) || (!creator.is_teacher? && competition.member_multiple_limited?)

@ -12,6 +12,7 @@
competitions/save_team_form:
attributes:
creator:
enrolled: "您已经报名过该竞赛了"
teacher_enroll_forbidden: "本竞赛的参赛者限定为:学生"
member_enroll_forbidden: "本竞赛的参赛者限定为:教师"
teacher_ids:

Loading…
Cancel
Save