Example #1
0
 def get_current_and_available_loans(self):
     current_loans = borrow.get_edition_loans(self)
     current_and_available_loans = (
         current_loans,
         self._get_available_loans(current_loans),
     )
     return current_and_available_loans
Example #2
0
 def get_current_loans(self):
     return borrow.get_edition_loans(self)
Example #3
0
def _is_loaned_out(book_key):
    from openlibrary.plugins.upstream import borrow
    book = web.ctx.site.get(book_key)
    return borrow.get_edition_loans(book) != []