mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-16 02:16:16 +00:00
junior points
This commit is contained in:
@ -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', 'updated_at')
|
||||
juniors_points = JuniorPoints.objects.order_by('-total_points', 'created_at')
|
||||
|
||||
# Now, iterate through the queryset and update the position field based on the order.
|
||||
position = 1
|
||||
|
Reference in New Issue
Block a user