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