We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c6a988 commit 3c3f2f3Copy full SHA for 3c3f2f3
website/views/organization.py
@@ -2402,8 +2402,11 @@ def add_sizzle_checkIN(request):
2402
next_challenge_at = last_checkin_for_timer.created + timedelta(hours=CHALLENGE_RESET_HOURS)
2403
else:
2404
# If no check-in, check if there's a next_challenge_at set
2405
+ # Scope to today's challenge to avoid returning challenges from previous days
2406
+ today = now().date()
2407
current_challenge = UserDailyChallenge.objects.filter(
2408
user=request.user,
2409
+ challenge_date=today,
2410
status="assigned",
2411
).first()
2412
if current_challenge and current_challenge.next_challenge_at:
0 commit comments