diff --git a/junior/views.py b/junior/views.py index 471db0f..ed42430 100644 --- a/junior/views.py +++ b/junior/views.py @@ -357,15 +357,11 @@ class JuniorPointsListAPIView(viewsets.ModelViewSet): permission_classes = [IsAuthenticated] http_method_names = ('get',) - def get_queryset(self): - """get queryset""" - update_positions_based_on_points() - return JuniorTask.objects.filter(junior__auth__email=self.request.user).last() def list(self, request, *args, **kwargs): """profile view""" - try: - queryset = self.get_queryset() + update_positions_based_on_points() + queryset = JuniorTask.objects.filter(junior__auth__email=self.request.user).last() # update position of junior serializer = JuniorPointsSerializer(queryset) return custom_response(None, serializer.data, response_status=status.HTTP_200_OK)