From 539a2639ee41b779f11de194498bc306e3da1dbe Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Thu, 29 Sep 2022 12:23:16 -0500 Subject: [PATCH] Allow volunteer search --- judge/views/problem.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/judge/views/problem.py b/judge/views/problem.py index 9cf20e9..ba9790c 100644 --- a/judge/views/problem.py +++ b/judge/views/problem.py @@ -845,8 +845,10 @@ class ProblemFeed(ProblemList): if self.feed_type == "new": return queryset.order_by("-date") elif user and self.feed_type == "volunteer": - voted_problems = user.volunteer_problem_votes.values_list( - "problem", flat=True + voted_problems = ( + user.volunteer_problem_votes.values_list("problem", flat=True) + if not bool(self.search_query) + else [] ) if self.show_solved_only: queryset = queryset.filter(