Content-Length: 218735 | pFad | http://github.com/internetarchive/openlibrary/commit/e89362ba6a8d303b410bb76067e1b2d659bdb169

02 improved is_loaned_out logic · internetarchive/openlibrary@e89362b · GitHub
Skip to content

Commit

Permalink
improved is_loaned_out logic
Browse files Browse the repository at this point in the history
  • Loading branch information
RayBB committed Apr 23, 2024
1 parent c1d6788 commit e89362b
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 e89362b

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/e89362ba6a8d303b410bb76067e1b2d659bdb169

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy