Skip to content

Commit

Permalink
filter on conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
JibrilExe committed May 23, 2024
1 parent 0ba6d53 commit b2596d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/project/endpoints/projects/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def get(self, uid=None):
projects = projects.all()
projects = [p for p in projects if get_course_of_project(p.project_id) in courses]
projects_student = Project.query.filter(Project.course_id.in_(courses_student)).all()
projects_student = projects_student.filter(and_(*conditions)) if conditions else projects_student
projects_student = [p for p in projects_student if p.visible_for_students]
projects += projects_student

Expand Down

0 comments on commit b2596d1

Please sign in to comment.