Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update MyFantasyLeague for playoff weeks (#117)
**Summary:** - Corrects the situation where a MyFantasyLeague weekly schedule has a single matchup (championship week) by converting the matchup element to a list[] like the other weeks. - Corrects the situation where matchups is missing (skipped week) by breaking the week loop. (This might be better if it just skipped the rest of the code and continued to the next week to account for skipped weeks other than the final week.) **Testing** All tests pass 100% (Didn't create any new tests, sorry.) **Background:** @joeyagreco When I was testing Leeger with MyFantasyLeague I found that it received errors in week 17 (championship) and 18 (skipped) of my league data. That's because the schedule object is a bit different than the rest of the weeks: **Weeks 1-16** - matchup is a list[] of matchups `"schedule": { "weeklySchedule": { "week": "16", "matchup": [ { "franchise": [ {...` **Week 17** - matchup is a single matchup element `"schedule": { "weeklySchedule": { "week": "17", "matchup": { "franchise": [... } },` **Week 18** - no matchup element for a skipped week `"schedule": { "weeklySchedule": { "week": "18" } },`
- Loading branch information