Use the same filter as the dashboard

This commit is contained in:
tcely authored and GitHub committed 2025-07-03 23:00:50 -04:00
1 parent 1a61e3882a
commit 75ef10ed1f
1 file changed
+4 -1
+4 -1
View File
@@ -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)