mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-16 10:26:16 +00:00
jira-34 referral code validation API
This commit is contained in:
@ -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):
|
||||
|
Reference in New Issue
Block a user