NYPL-Simplified / circulation

Circulation manager for Library Simplified
Other
19 stars 19 forks source link

Fix IndexError reported by NewRelic #1820

Closed thinkwebengineer closed 1 year ago

thinkwebengineer commented 1 year ago

Description

Add test case for book information that returns an empty list for series_position (line 193 of test_novelist). Update novelist.py (line 430) to account for this test case. This was an error reported by NewRelic and ticketed here

Motivation and Context

An index error was reported on NewRelic Circulation Manager (Prod). The change checks to ensure that there is a list to check or returns None allowing the function to return properly.

How Has This Been Tested?

Tests updated to include this scenario (line 190 of test_novelist.py)

Checklist: