From 48d0a58daef5d9e21aa33edf3a616a59e34dc939 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Wed, 24 Jul 2024 17:19:25 +0700 Subject: [PATCH] Dont show official contests in home --- judge/views/blog.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/judge/views/blog.py b/judge/views/blog.py index 314dd10..93b3c35 100644 --- a/judge/views/blog.py +++ b/judge/views/blog.py @@ -51,14 +51,13 @@ class HomeFeedView(FeedView): now = timezone.now() visible_contests = ( Contest.get_visible_contests(self.request.user, show_own_contests_only=True) - .filter(is_visible=True) + .filter(is_visible=True, official__isnull=True) .order_by("start_time") ) if self.request.organization: visible_contests = visible_contests.filter( is_organization_private=True, organizations=self.request.organization ) - context["current_contests"] = visible_contests.filter( start_time__lte=now, end_time__gt=now )