fix: variant render uses fragile track_name string mapping #149
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
autonomous
bug
enhancement
feature
in-queue
performance
security
size:M
size:S
tech-debt
tests
todo
type:feature
type:stability
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-discord#149
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
In
_trigger_variant_renders()atlogic_gameplay.py:4260-4261:This maps track names to card types via string check. If the API ever returns "Starting Pitcher", "SP", or any other variant, the mapping breaks silently and renders batting cards for pitchers. The default of "Batter" means any unexpected track name also gets treated as batting.
Fix
Use the track's
card_typefield (already available in refractor data assp,rp, orbatter) rather than the display-orientedtrack_namestring.Impact
Low effort fix. Prevents silent wrong-card-type renders.
PR #153 opened: #153
Replaced
track_namestring matching withcard_typefield lookup (sp/rp→pitching,batter→batting). 2-line change in_trigger_variant_renders(). Test fixtures updated and assertions strengthened to verify the correct card type in the render URL.