cwendt94 / espn-api

ESPN Fantasy API! (Football, Basketball)
MIT License
613 stars 198 forks source link

Edge case "None" owners fix #519

Closed dtcarls closed 9 months ago

dtcarls commented 9 months ago

fixes #518

Fixes edge case, where if team has the key 'owners' but its value is None or an empty list, this will raise an IndexError. It will now properly make an empty list with an indexable [0] element

codecov-commenter commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (15094e4) 81.03% compared to head (fa5f6be) 81.03%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #519 +/- ## ======================================= Coverage 81.03% 81.03% ======================================= Files 60 60 Lines 2209 2209 ======================================= Hits 1790 1790 Misses 419 419 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cwendt94 commented 9 months ago

Good catch!

dtcarls commented 9 months ago

When you run it multiple times a week against several hundred leagues, you find edge cases fast lol. Thanks for the merge and release.

cwendt94 commented 9 months ago

I bet lol, that is very helpful! Thanks again for the PR!