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:
parent
4aabac1bdc
commit
3550a17401
@ -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'])
|
||||
|
Loading…
Reference in New Issue
Block a user