fix copy ec year

dev_trainings
p31729568 6 years ago
parent 436571090a
commit 7efe78c83a

@ -197,7 +197,7 @@
def copy_graduation_subitem_course_targets!(target, to_target) def copy_graduation_subitem_course_targets!(target, to_target)
target.ec_graduation_subitem_course_targets.each do |support| target.ec_graduation_subitem_course_targets.each do |support|
to_support = to_target.ec_graduation_subitem_course_targets.new to_support = to_target.ec_graduation_subitem_course_targets.new
to_support.attributes = support.attributes.except('id', 'ec_graduation_subitem_id', 'created_at', 'updated_at') to_support.attributes = support.attributes.except('id', 'ec_course_target_id', 'ec_graduation_subitem_id', 'created_at', 'updated_at')
to_support.ec_graduation_subitem_id = graduation_subitem_map[support.ec_graduation_subitem_id] to_support.ec_graduation_subitem_id = graduation_subitem_map[support.ec_graduation_subitem_id]
to_support.save! to_support.save!
end end

Loading…
Cancel
Save