diff --git a/.DS_Store b/.DS_Store index ccbeaa6d..78458652 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/osinaweb/.DS_Store b/osinaweb/.DS_Store index 4057deb9..7f52af91 100644 Binary files a/osinaweb/.DS_Store and b/osinaweb/.DS_Store differ diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index 34b3c6e1..4bf76dc8 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -831,14 +831,12 @@ def get_latest_activities(request): total_tasks = open_task_count + working_on_task_count - # Get the current time - current_time = timezone.now() - # Calculate the datetime of 24 hours ago - twenty_four_hours_ago = current_time - timezone.timedelta(hours=24) + today = datetime.now().date() + # Fetch the latest statuses from the last 24 hours - latest_statuses = Status.objects.filter(date__gte=twenty_four_hours_ago).order_by('-id') + latest_statuses = Status.objects.filter(date=today).order_by('-id') # Calculate time ago for each status and store it in a dictionary latest_statuses_time_ago = [{'status': status, 'time_ago': calculate_time_ago(status)} for status in latest_statuses]