From 9a8705982bb69537cb5e0fea88b097017152345e Mon Sep 17 00:00:00 2001 From: anke1460 Date: Fri, 13 Mar 2020 17:16:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=86=E9=A2=91=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=BB=93=E6=9D=9F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/create_watch_video_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/create_watch_video_service.rb b/app/services/create_watch_video_service.rb index 9432c65bc..28cf36838 100644 --- a/app/services/create_watch_video_service.rb +++ b/app/services/create_watch_video_service.rb @@ -23,7 +23,7 @@ class CreateWatchVideoService < ApplicationService watch_video_history.end_at = current_time watch_video_history.total_duration = params[:total_duration] watch_video_history.watch_duration = params[:watch_duration].to_f > watch_video_history.duration ? watch_video_history.duration : params[:watch_duration] - watch_video_history.is_finished = (watch_video_history.duration <= params[:watch_duration].to_f) + watch_video_history.is_finished = params[:ed].present? watch_video_history.save! watch_course_video = watch_video_history.watch_course_video