diff --git a/app/controllers/test_controller.rb b/app/controllers/test_controller.rb --- a/app/controllers/test_controller.rb +++ b/app/controllers/test_controller.rb @@ -101,7 +101,7 @@ end @test_requests = [] @user.test_requests.each do |ts| - if ts.problem.available + if ts.problem and ts.problem.available @test_requests << ts end end