From 5b98e3bc41b663a0299af70746d04a359021a19a Mon Sep 17 00:00:00 2001 From: bohung Date: Wed, 9 Nov 2022 13:20:36 +0800 Subject: [PATCH] Fix bug. --- app/controllers/admin/seminars_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/seminars_controller.rb b/app/controllers/admin/seminars_controller.rb index 1afb047..84560af 100644 --- a/app/controllers/admin/seminars_controller.rb +++ b/app/controllers/admin/seminars_controller.rb @@ -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