-
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/pip/aiohttp-3.10.2
- Loading branch information
Showing
9 changed files
with
100 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ def get(self, request): | |
|
||
def api_book_search(request): | ||
"""Return books via API response""" | ||
query = request.GET.get("q") | ||
query = request.GET.get("q").strip() | ||
query = isbn_check_and_format(query) | ||
min_confidence = request.GET.get("min_confidence", 0) | ||
# only return local book results via json so we don't cascade | ||
|
@@ -65,7 +65,7 @@ def api_book_search(request): | |
|
||
def book_search(request): | ||
"""the real business is elsewhere""" | ||
query = request.GET.get("q") | ||
query = request.GET.get("q").strip() | ||
# check if query is isbn | ||
query = isbn_check_and_format(query) | ||
min_confidence = request.GET.get("min_confidence", 0) | ||
|
@@ -123,8 +123,7 @@ def author_search(request): | |
def user_search(request): | ||
"""user search: search for a user""" | ||
viewer = request.user | ||
query = request.GET.get("q") | ||
query = query.strip() | ||
query = request.GET.get("q").strip() | ||
data = {"type": "user", "query": query} | ||
|
||
# use webfinger for mastodon style [email protected] username to load the user if | ||
|
@@ -162,7 +161,7 @@ def user_search(request): | |
|
||
def list_search(request): | ||
"""any relevent lists?""" | ||
query = request.GET.get("q") | ||
query = request.GET.get("q").strip() | ||
data = {"query": query, "type": "list"} | ||
results = ( | ||
models.List.privacy_filter( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters