1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-22 19:44:02 +08:00

!34 修复创建课时相关属性表数据未生成的问题

* 修复创建课时相关属性表数据未生成的问题
This commit is contained in:
koogua 2020-12-07 13:37:50 +08:00
parent 029de410a8
commit edc6edbfda

View File

@ -78,6 +78,7 @@ class Chapter extends Service
$data['parent_id'] = $parent->id;
$data['free'] = $validator->checkFreeStatus($post['free']);
$data['priority'] = $chapterRepo->maxLessonPriority($post['parent_id']);
$parentId = $parent->id;
} else {
$data['priority'] = $chapterRepo->maxChapterPriority($post['course_id']);
$data['parent_id'] = $parentId;
@ -120,7 +121,7 @@ class Chapter extends Service
}
if ($attrs === false) {
throw new \RuntimeException("Create Chapter {$course->model} Attrs Failed");
throw new \RuntimeException("Create Chapter Related Attrs Failed");
}
}