Content-Length: 823 | pFad | http://github.com/internetarchive/openlibrary/commit/8e106b227de2d4b30abb4baa03f9e65281bafc67.diff
7F diff --git a/openlibrary/core/lending.py b/openlibrary/core/lending.py index 65ece717d7c..0ba3c0bd470 100644 --- a/openlibrary/core/lending.py +++ b/openlibrary/core/lending.py @@ -551,7 +551,7 @@ def is_loaned_out(identifier: str) -> bool: return ( is_loaned_out_on_ol(identifier) or is_loaned_out_on_acs4(identifier) - or is_loaned_out_on_ia(identifier) + or (is_loaned_out_on_ia(identifier) is True) ) @@ -561,7 +561,7 @@ def is_loaned_out_on_acs4(identifier: str) -> bool: return item.has_loan() -def is_loaned_out_on_ia(identifier: str): +def is_loaned_out_on_ia(identifier: str) -> bool | None: """Returns True if the item is checked out on Internet Archive.""" url = "https://archive.org/services/borrow/%s?action=status" % identifier try:Fetched URL: http://github.com/internetarchive/openlibrary/commit/8e106b227de2d4b30abb4baa03f9e65281bafc67.diff
Alternative Proxies: