NYPL-Simplified / server_core

Shared data model and utilities for Library Simplified server applications
7 stars 11 forks source link

When finding books that are not currently available, make sure that they are currently licensed. #1232

Closed leonardr closed 3 years ago

leonardr commented 3 years ago

This branch fixes a bug I found while doing QA on https://jira.nypl.org/browse/SIMPLY-3236.

A book for which the library owns no licenses will be indexed in Elasticsearch as available=false, which is what we were using to find books that are "not currently available". But a book like that isn't available at all and it won't ever show up in an OPDS feed.

To find books that are not currently available we need to check both available=false and licensed=true.