Fix MLB division leaders showing under wildcard #84
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/mlb-division-rank"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
MlbStandingsAdapternever populateddivisionRank, sobuildDivisionSectionsevaluated every team asdivisionRank ?? 99 > 1and put them all in the wildcard sectiondivisionRankper team using ESPN's original division entry order (ESPN already applies MLB's official tiebreakers — run differential, head-to-head — so re-sorting by win/loss would discard them)divisionRankthrough to the upsert; next sync will fix the live displayNot affected
divisionSequencedirectly; never brokenflatdisplay mode;divisionRankis not consultedKnown gaps (not in scope)
syncStandingschange detection only checksgamesPlayed+leagueRank, sostandingsLastChangedAtwon't fire on the first sync after this fix (subsequent syncs are fine)Test plan
divisionRank1 for division leader, 2 for second place, across both leagues