Content-Length: 219311 | pFad | http://github.com/internetarchive/openlibrary/commit/8e106b227de2d4b30abb4baa03f9e65281bafc67

01 Merge pull request #9139 from internetarchive/fix/is_loaned_out · internetarchive/openlibrary@8e106b2 · GitHub
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
@@ -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:

0 comments on commit 8e106b2

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/internetarchive/openlibrary/commit/8e106b227de2d4b30abb4baa03f9e65281bafc67

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy