From 9608b2965652e4d6ffb90ad38ff8a6b0701b8880 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 22 Sep 2023 10:17:55 -0400 Subject: posts: added filter to exclude things already turned in --- app/posts/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/posts/views.py b/app/posts/views.py index 40368df..250611f 100644 --- a/app/posts/views.py +++ b/app/posts/views.py @@ -41,7 +41,7 @@ class PostTodoView(LoginRequiredMixin, ListView): def get_queryset(self): qs = Post.objects.filter(user=self.request.user) - qs = qs.filter(Q(needs_update=True) | Q(is_live=0)) + qs = qs.filter(Q(needs_update=True) | Q(is_live=0)).exclude(post_status=1) unsorted_results = qs.all() return sorted(unsorted_results, key=lambda a: a.days_overdue(), reverse=True) -- cgit v1.2.3-70-g09d2