Skip to content

Commit

Permalink
Merge pull request #314 from jwjacobson/dev
Browse files Browse the repository at this point in the history
Update tune_browse view to correctly return 0 results if a query has …
  • Loading branch information
jwjacobson authored Sep 19, 2024
2 parents d52593f + dbd7a9e commit 2360c2e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tune/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ def tune_browse(request):
search_form = SearchForm(request.POST)
if search_form.is_valid():
search_terms = search_form.cleaned_data["search_term"].split(" ")
tunes = return_search_results(request, search_terms, tunes, search_form)[
"tunes"
]
tune_count = len(tunes)
results = return_search_results(request, search_terms, tunes, search_form)
tunes = results.get("tunes")
tune_count = results.get("tune_count", 0)

else:
search_form = SearchForm()

Expand Down

0 comments on commit 2360c2e

Please sign in to comment.