Skip to content
Snippets Groups Projects
Unverified Commit 316e6c86 authored by Dan Braghis's avatar Dan Braghis Committed by GitHub
Browse files

Merge pull request #123 from OpenTechFund/bugfix/enable-search-of-all-live-pages

Bugfix/enable search of all live pages
parents 4758993f 82d27917
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,10 @@ def search(request): ...@@ -14,7 +14,10 @@ def search(request):
# Search # Search
if search_query: if search_query:
public_site = HomePage.objects.first() public_site = HomePage.objects.first()
search_results = Page.objects.live().child_of(public_site).search(search_query, operator='and') search_results = Page.objects.live().descendant_of(
public_site,
inclusive=True,
).search(search_query, operator='and')
query = Query.get(search_query) query = Query.get(search_query)
# Record hit # Record hit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment