Skip to content

Commit

Permalink
Merge pull request #751 from tcely/patch-5
Browse files Browse the repository at this point in the history
Remove duplicate function
  • Loading branch information
meeb authored Feb 21, 2025
2 parents d163c11 + e727e30 commit 9b25f4b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tubesync/sync/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,13 +819,9 @@ def dispatch(self, request, *args, **kwargs):
return super().dispatch(request, *args, **kwargs)

def get_queryset(self):
return CompletedTask.objects.all().order_by('-run_at')

def get_queryset(self):
q = CompletedTask.objects.all()
if self.filter_source:
q = CompletedTask.objects.filter(queue=str(self.filter_source.pk))
else:
q = CompletedTask.objects.all()
q = q.filter(queue=str(self.filter_source.pk))
return q.order_by('-run_at')

def get_context_data(self, *args, **kwargs):
Expand Down

0 comments on commit 9b25f4b

Please sign in to comment.