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

Exception generating same-series feed when NoveList doesn't include the book you asked for originally

XMLWordPrintable

      This line in get_series_information can fail:

      series_position = matching_series_volume[0].get('volume')

      It fails if matching_series_volume is an empty list. I believe this can happen if NoveList responds to a "what books are in this series" query with a list of books that doesn't include the one you asked about.

      To get specific, this happens with /works/Bibliotheca ID/rrmse89/related_books. The title is "Quiddich Through the Ages" and the series is "Harry Potter (Companion volumes)". But when we ask NoveList for all the books in the "Harry Potter (Companion volumes)" series, we only get one answer: "Fantastic Beasts and Where to Find Them".

      We filter this one-item list for all the books with title="Quiddich Through the Ages", and we get an empty list. Then we take the first item from the empty list, causing a crash.

      Clearly the NoveList data isn't complete, but we should be able to survive this without a crash. "Fantastic Beasts" should still show up in the "same series" feed for "Quiddich" even if "Quiddich" itself does not due to a quirk of NoveList data.

            leonardrichardson Leonard Richardson [X] (Inactive)
            leonardrichardson Leonard Richardson [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: