Dont show official contests in home
This commit is contained in:
parent
7aecf6b046
commit
48d0a58dae
1 changed files with 1 additions and 2 deletions
|
@ -51,14 +51,13 @@ class HomeFeedView(FeedView):
|
||||||
now = timezone.now()
|
now = timezone.now()
|
||||||
visible_contests = (
|
visible_contests = (
|
||||||
Contest.get_visible_contests(self.request.user, show_own_contests_only=True)
|
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")
|
.order_by("start_time")
|
||||||
)
|
)
|
||||||
if self.request.organization:
|
if self.request.organization:
|
||||||
visible_contests = visible_contests.filter(
|
visible_contests = visible_contests.filter(
|
||||||
is_organization_private=True, organizations=self.request.organization
|
is_organization_private=True, organizations=self.request.organization
|
||||||
)
|
)
|
||||||
|
|
||||||
context["current_contests"] = visible_contests.filter(
|
context["current_contests"] = visible_contests.filter(
|
||||||
start_time__lte=now, end_time__gt=now
|
start_time__lte=now, end_time__gt=now
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue