修复500问题
This commit is contained in:
parent
8126353b43
commit
e614a2d111
|
@ -917,6 +917,9 @@ class User < Principal
|
|||
|
||||
# 判断是否是竞赛的主办人
|
||||
def admin_of_contest?(contest)
|
||||
if contest.nil?
|
||||
return false
|
||||
end
|
||||
if ContestMember.where("user_id =? and contest_id =?", self.id, contest.id).count == 0
|
||||
return false
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue