{"action":"opened","issue":{"url":"https://api.github.com/repos/jah2488/classroom/issues/124","labels_url":"https://api.github.com/repos/jah2488/classroom/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/jah2488/classroom/issues/124/comments","events_url":"https://api.github.com/repos/jah2488/classroom/issues/124/events","html_url":"https://github.com/jah2488/classroom/issues/124","id":106880940,"number":124,"title":"NoMethodError: undefined method `cohort' for nil:NilClass","user":{"login":"kurtisnelson","id":169606,"avatar_url":"https://avatars.githubusercontent.com/u/169606?v=3","gravatar_id":"","url":"https://api.github.com/users/kurtisnelson","html_url":"https://github.com/kurtisnelson","followers_url":"https://api.github.com/users/kurtisnelson/followers","following_url":"https://api.github.com/users/kurtisnelson/following{/other_user}","gists_url":"https://api.github.com/users/kurtisnelson/gists{/gist_id}","starred_url":"https://api.github.com/users/kurtisnelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurtisnelson/subscriptions","organizations_url":"https://api.github.com/users/kurtisnelson/orgs","repos_url":"https://api.github.com/users/kurtisnelson/repos","events_url":"https://api.github.com/users/kurtisnelson/events{/privacy}","received_events_url":"https://api.github.com/users/kurtisnelson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jah2488/classroom/labels/airbrake","name":"airbrake","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-16T22:58:22Z","updated_at":"2015-09-16T22:58:22Z","closed_at":null,"body":"Check full details on Airbrake: [#1511126340889566276](https://herokuapp35420624herokucom.airbrake.io/projects/114517/groups/1511126340889566276)\n\nBacktrace:\n```\n[PROJECT_ROOT]/app/models/instructor.rb:31:in has_student?\n[PROJECT_ROOT]/app/policies/submission_policy.rb:12:in update?\n[PROJECT_ROOT]/app/policies/submission_policy.rb:19:in show?\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/pundit-1.0.1/lib/pundit.rb:116:in public_send\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/pundit-1.0.1/lib/pundit.rb:116:in authorize\n[PROJECT_ROOT]/app/controllers/submissions_controller.rb:13:in show\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_controller/metal/implicit_render.rb:4:in send_action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:198:in process_action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_controller/metal/rendering.rb:10:in process_action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:20:in block in process_action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in block in halting_and_conditional\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in block in halting\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in block in halting_and_conditional\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in block in halting\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in block in halting\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in block in halting\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in block in halting\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in block in halting\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in block in halting\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in block in halting\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in block in halting\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in _run_callbacks\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in _run_process_action_callbacks\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in run_callbacks\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:19:in process_action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_controller/metal/rescue.rb:29:in process_action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:31:in block in process_action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in block in instrument\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in instrument\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in instrument\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:30:in process_action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_controller/metal/params_wrapper.rb:250:in process_action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/railties/controller_runtime.rb:18:in process_action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:137:in process\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionview-4.2.0/lib/action_view/rendering.rb:30:in process\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_controller/metal.rb:195:in dispatch\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_controller/metal/rack_delegation.rb:13:in dispatch\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_controller/metal.rb:236:in block in action\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:73:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:73:in dispatch\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:42:in serve\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:43:in block in serve\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:30:in each\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:30:in serve\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:802:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in call!\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in block in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in catch\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:25:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/head.rb:13:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/params_parser.rb:27:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/flash.rb:260:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in context\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/cookies.rb:560:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/query_cache.rb:36:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:29:in block in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in _run_callbacks\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in _run_call_callbacks\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in run_callbacks\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:27:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/remote_ip.rb:78:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:38:in call_app\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in block in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in block in tagged\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:26:in tagged\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in tagged\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/request_store-1.2.0/lib/request_store/middleware.rb:8:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/request_id.rb:21:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/static.rb:113:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/ssl.rb:24:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/skylight-0.8.0/lib/skylight/middleware.rb:61:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:518:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:164:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/puma-2.13.4/lib/puma/configuration.rb:78:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/puma-2.13.4/lib/puma/server.rb:541:in handle_request\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/puma-2.13.4/lib/puma/server.rb:388:in process_client\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/puma-2.13.4/lib/puma/server.rb:270:in block in run\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/puma-2.13.4/lib/puma/thread_pool.rb:106:in call\n[PROJECT_ROOT]/vendor/bundle/ruby/2.2.0/gems/puma-2.13.4/lib/puma/thread_pool.rb:106:in block in spawn_thread\n```"}}