diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 324d2214e..e816ab667 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -22,8 +22,8 @@ class MyshixunsController < ApplicationController tip_exception("403", "") end begin + @shixun = Shixun.select(:id, :identifier, :challenges_count).find(@myshixun.shixun_id) ActiveRecord::Base.transaction do - @shixun = Shixun.select(:id, :identifier, :challenges_count).find(@myshixun.shixun_id) @myshixun.destroy! StudentWork.where(:myshixun_id => @myshixun.id)