0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Fix crash

content_types is a dictionary of model classes => content types.

content_type__in requires a list of content types so .values() is called
This commit is contained in:
Karl Hobley 2015-08-11 16:44:37 +01:00
parent 4aabac1bdc
commit 3550a17401

View File

@ -126,7 +126,7 @@ def search(request, parent_page_id=None):
# Restrict content types
if content_types:
pages = pages.filter(content_type__in=content_types)
pages = pages.filter(content_type__in=content_types.values())
# Do search
pages = pages.filter(title__icontains=search_form.cleaned_data['q'])