Merge branch 'master' into 'master'

Fix bug.

See merge request spen/seminar!52
This commit is contained in:
chiu 2022-11-09 05:25:00 +00:00
commit 9166e7cddf
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