Uploaded image for project: 'SimplyE 2.0'
  1. SimplyE 2.0
  2. SIMPLY-2779

Borrowing when all licenses expired raises NoAvailableCopies, rather than NoLicenses

XMLWordPrintable

      During checkout of an ODL edition, if all the licenses in the associated licensepool are expired, checkout raises NoAvailableCopies, rather than NoLicenses.

      When the best available license is being chosen for the request, none are actually available. But, instead of raising NoLicenses, as would seem most appropriate in this case, NoAvailableCopies is raised. This triggers a hold (ODLAPI._place_hold), which triggers an addition check to ensure that there truly are no licenses available. That check fails (there are "available" licenses, they're just expired) and raises an unhandled CurrentlyAvailable exception, which Flask handles.

       

            leonardrichardson Leonard Richardson [X] (Inactive)
            TimDiLauro Tim DiLauro
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: