This returns a hardcoded list of AvailabilitySlots with items that satisfying the conditions
NOTE: the last case in the list of itemStates should have no available dates:
missingItemResponse(workWithAvailableItemNumber),
workWithAvailableItem,
availableOnlineAccessCondition,
availableDates // this should be None, possible bug in the Sierra updater
It looks like there's a bug with how the missing items are handled: we keep them in the item list without updating their accessConditions.
I was trying to reinvent the wheel until I realised there's already a DisplayAccessConditionOps class that give you a boolean "isRequestable" from the item's DisplayAccessCondition. Might be worth double checking the logic is sound in there
Pull request checklist
Does this patch need a change to the documentation?
This returns a hardcoded list of
AvailabilitySlots
with items that satisfying the conditionsNOTE: the last case in the list of
itemStates
should have no available dates:It looks like there's a bug with how the missing items are handled: we keep them in the item list without updating their accessConditions.
I was trying to reinvent the wheel until I realised there's already a
DisplayAccessConditionOps
class that give you a boolean "isRequestable" from the item'sDisplayAccessCondition
. Might be worth double checking the logic is sound in therePull request checklist
Does this patch need a change to the documentation?
Do you need to update the Catalogue API Swagger?