-
Bug
-
Resolution: Done
-
Medium
-
None
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.