jira-34 referral code validation API

This commit is contained in:
jain
2023-07-19 17:45:20 +05:30
parent 2e3870dc53
commit 9f9926da14
11 changed files with 106 additions and 16 deletions

View File

@ -94,7 +94,7 @@ class UpdateGuardianProfile(viewsets.ViewSet):
if serializer.is_valid():
"""save serializer"""
serializer.save()
return custom_response(None, serializer.data,response_status=status.HTTP_200_OK)
return custom_response(None, serializer.data, response_status=status.HTTP_200_OK)
return custom_error_response(serializer.errors, response_status=status.HTTP_400_BAD_REQUEST)
@ -206,7 +206,7 @@ class TopJuniorListAPIView(viewsets.ModelViewSet):
def list(self, request, *args, **kwargs):
"""Fetch junior list of those who complete their tasks"""
junior_total_points = self.get_queryset().order_by('-total_task_points')
junior_total_points = self.get_queryset().order_by('-total_points')
# Update the position field for each JuniorPoints object
for index, junior in enumerate(junior_total_points):