Skip to content

Commit

Permalink
list fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderVanOyen committed Mar 10, 2024
1 parent c5fcf3e commit 8cbc51f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/pigeonhole/apps/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ def perform_create(self, serializer):

def list(self, request, *args, **kwargs):
course_id = kwargs.get('course_id')
project_id = kwargs.get('pk')

serializer = ProjectSerializer(instance=Project.objects.get(pk=project_id), many=False)
serializer = ProjectSerializer(Project.objects.filter(course_id=course_id), many=True)
return Response(serializer.data, status=status.HTTP_200_OK)

def create(self, request, *args, **kwargs):
Expand Down

0 comments on commit 8cbc51f

Please sign in to comment.