Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions accounts/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class UserAuthenticatedFollowingsAPIView(ListAPIView):
"""
Authenticated User can see own followings and unfollow them.
"""
queryset = Relation.objects.all()
queryset = Relation.objects.select_related('to_user').all()
permission_classes = [IsAuthenticated]
serializer_class = UserFollowingsSerializer

Expand Down Expand Up @@ -70,7 +70,7 @@ class UserAuthenticatedFollowersAPIView(ListAPIView):
"""
Authenticated User can see own followers
"""
queryset = Relation.objects.all()
queryset = Relation.objects.select_related('from_user').all()
permission_classes = [IsAuthenticated]
serializer_class = UserFollowersSerializer

Expand Down
2 changes: 1 addition & 1 deletion jobs/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class UserSkillProjectViewSet(ListModelMixin, GenericViewSet):
"""
To show all projects by authenticated User skills
"""
queryset = Project.objects.all()
queryset = Project.objects.prefetch_related('skills__skill').all()
serializer_class = ProjectSerializer
pagination_class = StandardSizePagination
permission_classes = [IsAuthenticated]
Expand Down