From ecab9737012adaac5fd04c89627a906b8ae992d5 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 9 Mar 2020 22:26:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=A7=86=E9=A2=91=E5=88=B0?= =?UTF-8?q?=E5=AD=90=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/videos/batch_publish_service.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/services/videos/batch_publish_service.rb b/app/services/videos/batch_publish_service.rb index 0523097a2..9ddcae146 100644 --- a/app/services/videos/batch_publish_service.rb +++ b/app/services/videos/batch_publish_service.rb @@ -41,7 +41,8 @@ class Videos::BatchPublishService < ApplicationService # 如果是课堂上传则创建课堂记录 Rails.logger.info("#####param: #{ param[:course_id]}") if param[:course_id].present? - video.course_videos.create!(course_id: param[:course_id]) + course_second_category_id = params[:category_id] || 0 + video.course_videos.create!(course_id: param[:course_id], course_second_category_id: course_second_category_id) end end end