Skip to content

Commit

Permalink
Merge branch 'development' into fix/reddots
Browse files Browse the repository at this point in the history
  • Loading branch information
warreprovoost committed May 23, 2024
2 parents b844054 + 50dfaaf commit 44e8a8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/project/endpoints/projects/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ def get(self, uid=None):
projects = projects.filter(and_(*conditions)) if conditions else projects
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 = Project.query.filter(Project.course_id.in_(courses_student))
projects_student = projects_student.filter(and_(*conditions)) \
if conditions else projects_student
projects_student = projects_student.all()
projects_student = [p for p in projects_student if p.visible_for_students]
projects += projects_student

Expand Down

0 comments on commit 44e8a8a

Please sign in to comment.