diff --git a/src/app/crud/crud_student.py b/src/app/crud/crud_student.py index 4e3e79c..188b050 100644 --- a/src/app/crud/crud_student.py +++ b/src/app/crud/crud_student.py @@ -148,10 +148,11 @@ async def update_add_student_rating(db: Session, student: Student, course_id: in async def get_course_information(db: Session, course_id: int, student: Student) -> StudentCourseSchema: course: Course = await crud_course.get_course_common_info(db=db, course_id=course_id) - student_rating = await get_student_rating(db=db, student_id=student.student_id, course_id=course_id) - student_progress = await get_student_progress(db=db, student_id=student.student_id, course_id=course_id) if course: + student_rating = await get_student_rating(db=db, student_id=student.student_id, course_id=course_id) + student_progress = await get_student_progress(db=db, student_id=student.student_id, course_id=course_id) + return StudentCourseSchema( course_id=course.course_id, title=course.title,