**Avoid resolving away lineups by non-unique numbers** #75
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#75
Loading…
Add table
Add a link
Reference in a new issue
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?
Avoid resolving away lineups by non-unique numbers
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 👍 / 👎.
Originally posted by @chatgpt-codex-connector[bot] in https://github.com/umpire274/bs_scoring/pull/74#discussion_r3347271601