Skip to content

Commit

Permalink
crud_student: fix view hidden courses
Browse files Browse the repository at this point in the history
  • Loading branch information
DenitsaTH committed Jun 10, 2024
1 parent e2566ea commit 05040ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/crud/crud_student.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ async def get_my_courses(student: Student) -> list[CourseInfo]:

my_courses_pydantic: list[CourseInfo] = []
for c in my_courses:
if c.is_hidden:
continue
tags = [str(t) for t in c.tags]
my_courses_pydantic.append(CourseInfo.from_query(
*(c.title, c.description, c.is_premium, tags)))
Expand Down

0 comments on commit 05040ec

Please sign in to comment.