Skip to content

Commit

Permalink
Only display editorials for public problems; fixes #1961
Browse files Browse the repository at this point in the history
  • Loading branch information
kiritofeng authored and quantum5 committed Oct 2, 2022
1 parent bd14f6e commit ac5a147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions judge/sitemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class SolutionSitemap(Sitemap):
priority = 0.8

def items(self):
return (Solution.objects.filter(is_public=True, publish_on__lte=timezone.now(), problem__isnull=False)
.values_list('problem__code'))
return (Solution.objects.filter(is_public=True, publish_on__lte=timezone.now(),
problem__in=Problem.get_public_problems()).values_list('problem__code'))

def location(self, obj):
return reverse('problem_editorial', args=obj)
Expand Down

0 comments on commit ac5a147

Please # to comment.