article card api, check answer api

This commit is contained in:
jain
2023-08-09 13:37:06 +05:30
parent f75201b3dd
commit d86f082e58
7 changed files with 152 additions and 10 deletions

View File

@ -50,7 +50,7 @@ def junior_approval_mail(guardian, full_name):
def update_positions_based_on_points():
"""Update position of the junior"""
# First, retrieve all the JuniorPoints instances ordered by total_points in descending order.
juniors_points = JuniorPoints.objects.order_by('-total_points')
juniors_points = JuniorPoints.objects.order_by('-total_points', 'updated_at')
# Now, iterate through the queryset and update the position field based on the order.
position = 1