From 75ef10ed1f31a8eacba5a0ef7f24a5e35d4dbb5a Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 3 Jul 2025 23:00:50 -0400 Subject: [PATCH] Use the same filter as the dashboard --- tubesync/sync/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tubesync/sync/views.py b/tubesync/sync/views.py index e62edeb6..3037001d 100644 --- a/tubesync/sync/views.py +++ b/tubesync/sync/views.py @@ -1010,7 +1010,10 @@ class CompletedTasksView(ListView): return super().dispatch(request, *args, **kwargs) def get_queryset(self): - qs = TaskHistory.objects.all() + qs = TaskHistory.objects.filter( + start_at__isnull=False, + end_at__gt=F('start_at'), + ) if self.filter_source: params_prefix=f'[["{self.filter_source.pk}"' qs = qs.filter(task_params__istartswith=params_prefix)