Erro em alguns Professores no I-diário

E, [2022-12-15T12:33:18.731555 #1501] ERROR -- : /home/deploy/.rvm/gems/ruby-2.4.10/gems/activerecord-4.2.11.1/lib/active_record/relation/finder_methods.rb:324:in `raise_record_not_found_exception!'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activerecord-4.2.11.1/lib/active_record/relation/finder_methods.rb:444:in `find_one'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activerecord-4.2.11.1/lib/active_record/relation/finder_methods.rb:423:in `find_with_ids'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activerecord-4.2.11.1/lib/active_record/relation/finder_methods.rb:71:in `find'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activerecord-4.2.11.1/lib/active_record/querying.rb:3:in `find'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activerecord-4.2.11.1/lib/active_record/core.rb:131:in `find'
/var/www/i-diario/app/forms/current_role_form.rb:145:in `set_defaults'
/var/www/i-diario/app/forms/current_role_form.rb:32:in `initialize'
/var/www/i-diario/app/controllers/application_controller.rb:232:in `new'
/var/www/i-diario/app/controllers/application_controller.rb:232:in `valid_current_role?'
/var/www/i-diario/app/controllers/application_controller.rb:142:in `check_for_current_user_role'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:145:in `block in halting_and_conditional'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:504:in `block in call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:504:in `each'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:504:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
/var/www/i-diario/app/controllers/application_controller.rb:305:in `set_thread_origin_type'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:312:in `block in halting'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:497:in `block in around'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:505:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
/var/www/i-diario/app/controllers/application_controller.rb:295:in `set_user_current'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:312:in `block in halting'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:497:in `block in around'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:505:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
/home/deploy/.rvm/gems/ruby-2.4.10/bundler/gems/activerecord-connections-b2a704ff10c4/lib/active_record/connections.rb:32:in `using_connection'
/var/www/i-diario/app/models/entity.rb:23:in `using_connection'
/var/www/i-diario/app/controllers/application_controller.rb:91:in `handle_customer'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:312:in `block in halting'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:497:in `block in around'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:505:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
/home/deploy/.rvm/gems/ruby-2.4.10/bundler/gems/audited-6d2ff8d5ae81/lib/audited/sweeper.rb:14:in `around'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:455:in `public_send'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:455:in `block in make_lambda'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:312:in `block in halting'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:497:in `block in around'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:505:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/notifications.rb:164:in `block in instrument'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/notifications.rb:164:in `instrument'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activerecord-4.2.11.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/abstract_controller/base.rb:137:in `process'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionview-4.2.11.1/lib/action_view/rendering.rb:30:in `process'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_controller/metal.rb:196:in `dispatch'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_controller/metal.rb:237:in `block in action'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/routing/route_set.rb:43:in `serve'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/journey/router.rb:30:in `each'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/journey/router.rb:30:in `serve'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/routing/route_set.rb:817:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/action_dispatch/routing/route_set.rb:14:in `block in call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/fanout.rb:25:in `instrument'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/action_dispatch/routing/route_set.rb:13:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/warden-1.2.7/lib/warden/manager.rb:36:in `block in call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/warden-1.2.7/lib/warden/manager.rb:35:in `catch'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/warden-1.2.7/lib/warden/manager.rb:35:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/rack-1.6.13/lib/rack/etag.rb:24:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/rack-1.6.13/lib/rack/conditionalget.rb:25:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/rack-1.6.13/lib/rack/head.rb:13:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/flash.rb:260:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/rack-1.6.13/lib/rack/session/abstract/id.rb:252:in `context'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/rack-1.6.13/lib/rack/session/abstract/id.rb:247:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activerecord-4.2.11.1/lib/active_record/query_cache.rb:36:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/railties-4.2.11.1/lib/rails/rack/logger.rb:38:in `call_app'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/railties-4.2.11.1/lib/rails/rack/logger.rb:20:in `block in call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:26:in `tagged'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:68:in `tagged'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/railties-4.2.11.1/lib/rails/rack/logger.rb:20:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/action_dispatch/request_id.rb:12:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/rack-1.6.13/lib/rack/methodoverride.rb:22:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/rack-1.6.13/lib/rack/runtime.rb:18:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/activesupport-4.2.11.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/static.rb:120:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/rack-1.6.13/lib/rack/sendfile.rb:113:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/rack-cors-1.0.6/lib/rack/cors.rb:98:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/honeybadger-4.5.6/lib/honeybadger/rack/error_notifier.rb:33:in `block in call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/honeybadger-4.5.6/lib/honeybadger/agent.rb:397:in `with_rack_env'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/honeybadger-4.5.6/lib/honeybadger/rack/error_notifier.rb:30:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/honeybadger-4.5.6/lib/honeybadger/rack/user_feedback.rb:31:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/honeybadger-4.5.6/lib/honeybadger/rack/user_informer.rb:21:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/skylight-core-4.3.2/lib/skylight/core/probes/middleware.rb:26:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/railties-4.2.11.1/lib/rails/engine.rb:518:in `call'
/home/deploy/.rvm/gems/ruby-2.4.10/gems/railties-4.2.11.1/lib/rails/application.rb:165:in `call'
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:107:in `process_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:419:in `block (3 levels) in start_threads'
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
I, [2022-12-15T12:33:18.733910 #1501]  INFO -- : Redirected to https://idiario.lapaoedu.com.br/
I, [2022-12-15T12:33:18.734343 #1501]  INFO -- : Completed 302 Found in 44ms (ActiveRecord: 19.6ms)
I, [2022-12-15T12:33:18.774956 #1479]  INFO -- : GET https://gestao.lapaoedu.com.br/module/Api/Turma?access_key=8876b9f68e9ba15eb4b17cc90f17464bdb0ce6d4&disciplina_id=3&instituicao_id=1&modified=2022-12-15+12%3A20%3A45+-0300&oper=get&resource=alunos-exame-turma&secret_key=00ece89fdb447cf487c1e8d535992571d871cb6e&turma_id=527 payload: {}
I, [2022-12-15T12:33:18.872582 #1479]  INFO -- :   Rendered final_recovery_diary_records/_student_fields.html.erb (2.7ms)
I, [2022-12-15T12:33:18.875677 #1479]  INFO -- :   Rendered final_recovery_diary_records/_student_fields.html.erb (2.4ms)
I, [2022-12-15T12:33:18.878840 #1479]  INFO -- :   Rendered final_recovery_diary_records/_student_fields.html.erb (2.5ms)
I, [2022-12-15T12:33:18.881810 #1479]  INFO -- :   Rendered final_recovery_diary_records/_student_fields.html.e