forked from mirrors/bookwyrm
Fixes testing if endpoint got results
This commit is contained in:
parent
ca7967a3a3
commit
9059b78b57
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ def book_search(query, user, min_confidence, search_remote=False):
|
||||||
"""the real business is elsewhere"""
|
"""the real business is elsewhere"""
|
||||||
# try a local-only search
|
# try a local-only search
|
||||||
results = [{"results": search(query, min_confidence=min_confidence)}]
|
results = [{"results": search(query, min_confidence=min_confidence)}]
|
||||||
if not user.is_authenticated or (results and not search_remote):
|
if not user.is_authenticated or (results[0]["results"] and not search_remote):
|
||||||
return results, False
|
return results, False
|
||||||
|
|
||||||
# if there were no local results, or the request was for remote, search all sources
|
# if there were no local results, or the request was for remote, search all sources
|
||||||
|
|
Loading…
Reference in a new issue