Fix admin contests view homepage
This commit is contained in:
parent
339a1b8817
commit
ad8c1c5e43
2 changed files with 3 additions and 3 deletions
|
@ -536,8 +536,8 @@ class Contest(models.Model):
|
|||
return False
|
||||
|
||||
@classmethod
|
||||
def get_visible_contests(cls, user):
|
||||
if not user.is_authenticated:
|
||||
def get_visible_contests(cls, user, *args):
|
||||
if not user.is_authenticated or args == (True,) :
|
||||
return (
|
||||
cls.objects.filter(
|
||||
is_visible=True, is_organization_private=False, is_private=False
|
||||
|
|
|
@ -70,7 +70,7 @@ class FeedView(ListView):
|
|||
now = timezone.now()
|
||||
|
||||
visible_contests = (
|
||||
Contest.get_visible_contests(self.request.user)
|
||||
Contest.get_visible_contests(self.request.user, True)
|
||||
.filter(is_visible=True)
|
||||
.order_by("start_time")
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue