dev_forum
jingquan huang 5 years ago
parent 5cd9ea1fd0
commit 7d1f7150f6

@ -830,8 +830,6 @@ private
def is_shixun_reset?(games, min_challenges, current_myshixun) def is_shixun_reset?(games, min_challenges, current_myshixun)
# 用户在申请发布之前,是否玩过实训 TODO: 重置的字段应该迁移到myshixuns表比较合适 # 用户在申请发布之前,是否玩过实训 TODO: 重置的字段应该迁移到myshixuns表比较合适
modify_shixun = ShixunModify.exists?(:myshixun_id => current_myshixun.id, :shixun_id => @shixun.id, :status => 1) modify_shixun = ShixunModify.exists?(:myshixun_id => current_myshixun.id, :shixun_id => @shixun.id, :status => 1)
games.size != min_challenges.size || games.size != min_challenges.size || modify_shixun
games.map(&:challenge_id) != min_challenges.map{|challenge| challenge.first} ||
modify_shixun
end end
end end

Loading…
Cancel
Save