fix(playball): use correct jersey number based on team side #74
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
umpire274/bs_scoring!74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/using-correct-jersey-number-playball"
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?
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
2413eb42e9ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
When
is_home_teamis false, this lookup now matches onaway_number, but the schema only enforcesUNIQUE(team_id, number)and the player create/edit/import paths allow duplicate away numbers. In that case the away roster display can show two players with the same jersey, this loop accepts the duplicate number, and the subsequentfindalways selects the first matching player whileused_numbersprevents selecting the other, so a valid-looking away lineup cannot be entered correctly. Consider enforcing away-number uniqueness or selecting players by a unique roster index/id.Useful? React with 👍 / 👎.