bug: scouting reports must filter variant=0 to exclude boosted stats #58
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-card-creation#58
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Problem
Scouting reports in
scouting_batters.pyandpd_cards/core/scouting.pyquery batting card ratings. If variant rows (with refractor-boosted stats) are present in the same tables, scouting could report evolved stats as baseline player ratings.Scouting reports should reflect a card's base power level, not a specific team's evolved version.
Fix
Ensure all scouting queries filter to
variant=0(or equivalent) to exclude refractor variant rows from baseline stat calculations.Impact
Data integrity issue. Without filtering, scouting reports become misleading once refractor variants exist in prod — players would see inflated stats that don't match the card they'd actually receive.
Fixed in PR #62.
Added
variant=0client-side filter on the API response in all four scouting data-fetch paths (scouting_batters.py,scouting_pitchers.py, and both functions inpd_cards/core/scouting.py). The filter uses.get("variant", 0) == 0so it's safe even if thevariantfield is absent from older API responses.