This commit is contained in:
BoHung Chiu 2021-04-24 19:28:46 +08:00
parent 92c0a4b106
commit 6863284dfa
1 changed files with 3 additions and 0 deletions

View File

@ -496,6 +496,9 @@ class Admin::SeminarsController < OrbitAdminController
if preferred_session_field.seminar_submission_values.count != 0 if preferred_session_field.seminar_submission_values.count != 0
seminar_submission_values = preferred_session_field.seminar_submission_values.to_a seminar_submission_values = preferred_session_field.seminar_submission_values.to_a
seminar_submission_values.each do |v| seminar_submission_values.each do |v|
if v.seminar_signup_contribute.nil?
v.destroy
end
next if v.val.to_i.to_s != v.val next if v.val.to_i.to_s != v.val
seminar_session = @seminar.seminar_sessions.where(:key=>v.val.to_i).first seminar_session = @seminar.seminar_sessions.where(:key=>v.val.to_i).first
seminar_session.default_seminar_signup_ids << v.seminar_signup_contribute.seminar_signup_id.to_s seminar_session.default_seminar_signup_ids << v.seminar_signup_contribute.seminar_signup_id.to_s