Skip to content

Commit

Permalink
Dont show official contests in home
Browse files Browse the repository at this point in the history
  • Loading branch information
cuom1999 committed Jul 24, 2024
1 parent 7aecf6b commit 48d0a58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions judge/views/blog.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ def get_context_data(self, **kwargs):
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
)
Expand Down

0 comments on commit 48d0a58

Please sign in to comment.