From a54464c45332b9ce2bdf0d9beeaf3990ab004de3 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 15 Aug 2022 20:00:31 -0400 Subject: [PATCH] fix for missing session test --- app/controllers/reports/schedule_reports_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/reports/schedule_reports_controller.rb b/app/controllers/reports/schedule_reports_controller.rb index ecf964a23..576d5e479 100644 --- a/app/controllers/reports/schedule_reports_controller.rb +++ b/app/controllers/reports/schedule_reports_controller.rb @@ -140,8 +140,10 @@ def check_assignments_changed(changes:, state_change_sessions:) next if state_change_sessions.include?(changed_assignment.session_id || changed_assignment.published_session_id) session = changed_assignment.session - session_id = change[:object][:published_session_id] || change[:object][:session_id] - session ||= Session.find session_id if Session.exists? session_id + if !session && change[:object] + session_id = change[:object][:published_session_id] || change[:object][:session_id] + session ||= Session.find session_id if Session.exists? session_id + end next unless session person ||= changed_assignment.person