Fix problem feed

This commit is contained in:
cuom1999 2021-01-07 20:10:02 -06:00
parent 0adbc74d95
commit acc8a91e63

View file

@ -15,8 +15,8 @@ class ProblemFeed(Feed):
description = 'The latest problems added on the %s website' % settings.SITE_LONG_NAME description = 'The latest problems added on the %s website' % settings.SITE_LONG_NAME
def items(self): def items(self):
return BlogPost.objects.filter(visible=True, publish_on__lte=timezone.now(), is_organization_private=False) \ return Problem.objects.filter(is_public=True, is_organization_private=False).defer('description')\
.order_by('-sticky', '-publish_on') .order_by('-date', '-id')[:25]
def item_title(self, problem): def item_title(self, problem):
return problem.name return problem.name