Skip to content

Commit

Permalink
Merge pull request #9139 from internetarchive/fix/is_loaned_out
Browse files Browse the repository at this point in the history
improved is_loaned_out logic
  • Loading branch information
mekarpeles authored May 13, 2024
2 parents 1d86a59 + e89362b commit 8e106b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openlibrary/core/lending.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)


Expand All @@ -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:
Expand Down

0 comments on commit 8e106b2

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy