This commit is contained in:
BoHung Chiu 2022-11-09 13:20:36 +08:00
parent eefb9f92f6
commit 5b98e3bc41
1 changed files with 2 additions and 2 deletions

View File

@ -436,7 +436,7 @@ class Admin::SeminarsController < OrbitAdminController
end
end
seminar_main_params = seminar_params
if seminar.copy_id
if seminar_main_params[:copy_id]
seminar_signup_set_params = seminar_main_params['seminar_signup_field_sets_attributes']
seminar_submission_set_params = seminar_main_params['seminar_submission_field_sets_attributes']
seminar_email_sets_params = seminar_main_params['seminar_email_sets_attributes']
@ -455,7 +455,7 @@ class Admin::SeminarsController < OrbitAdminController
seminar.except_clone_relations = ["seminar_signups","seminar_signup_values","seminar_signup_contributes","seminar_submission_values"]
end
seminar.save
if seminar.copy_id
if seminar_main_params[:copy_id]
seminar_signup_set_params.each do |key,value|
seminar.seminar_signup_field_sets[key.to_i].update_attributes(value) rescue nil
end