Allow volunteer search

This commit is contained in:
cuom1999 2022-09-29 12:23:16 -05:00
parent f36a5497e0
commit 539a2639ee

View file

@ -845,8 +845,10 @@ class ProblemFeed(ProblemList):
if self.feed_type == "new": if self.feed_type == "new":
return queryset.order_by("-date") return queryset.order_by("-date")
elif user and self.feed_type == "volunteer": elif user and self.feed_type == "volunteer":
voted_problems = user.volunteer_problem_votes.values_list( voted_problems = (
"problem", flat=True user.volunteer_problem_votes.values_list("problem", flat=True)
if not bool(self.search_query)
else []
) )
if self.show_solved_only: if self.show_solved_only:
queryset = queryset.filter( queryset = queryset.filter(