views: fix classic recipe search redirecting to recipe page with single result

If your classic recipe search returned a single result, then since
commit c8c25fb641 you got a standard
recipe page instead of the proper page with fields you can edit. To fix
it, just drop the redirection functionality from the classic recipe
search, since we don't really want it here.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2018-01-09 15:59:42 +13:00
parent 21f343201d
commit 11e5010b13

View File

@ -865,6 +865,10 @@ class RecipeDetailView(DetailView):
class ClassicRecipeSearchView(RecipeSearchView):
def render_to_response(self, context, **kwargs):
# Bypass the redirect-to-single-instance behaviour of RecipeSearchView
return super(ListView, self).render_to_response(context, **kwargs)
def get_queryset(self):
self.kwargs['branch'] = 'oe-classic'
query_string = self.request.GET.get('q', '')