diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 158f6512..c7534423 100755 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -69,7 +69,7 @@ class WelcomeController < ApplicationController new_stage_shixun = LocalStageShixun.new new_stage_shixun.attributes = stage_shixun.attributes.dup.except("id") new_stage_shixun.local_subject_id = local_subject.id - new_stage_shixun.local_subject_id = new_stage.id + new_stage_shixun.local_stage_id = new_stage.id new_stage_shixun.save! end end @@ -115,7 +115,9 @@ class WelcomeController < ApplicationController local_stage_shixuns.each do |local_stage_shixun| # 先同步实训 local_shixun = LocalShixun.where(id: local_stage_shixun.local_shixun_id).first - shixun = _local_to_shixun local_shixun if local_shixun.present? + shixun = _local_to_shixun(local_shixun) if local_shixun.present? + puts("#############local_shixun_id#{local_shixun.id}") + puts("#############shixun_id#{shixun.id}") new_stage_shixun = StageShixun.new new_stage_shixun.position = local_stage_shixun.position