**Reject duplicate away jersey mappings** #79

Closed
opened 2026-06-04 11:13:20 +02:00 by umpire274 · 0 comments
umpire274 commented 2026-06-04 11:13:20 +02:00 (Migrated from github.com)

Reject duplicate away jersey mappings

When importing an away lineup, this now keys the roster map by away_number, but away_number is not constrained to be unique in the schema or player create/update flows, so two active players on the same team can share the same away jersey. In that case HashMap::insert silently overwrites the earlier player and the import can save a lineup for the wrong player instead of reporting an ambiguous jersey number; please detect duplicate display numbers while building the map and return a validation error.

Useful? React with 👍 / 👎.

Originally posted by @chatgpt-codex-connector[bot] in https://github.com/umpire274/bs_scoring/pull/77#discussion_r3354757803

**Reject duplicate away jersey mappings** When importing an away lineup, this now keys the roster map by `away_number`, but `away_number` is not constrained to be unique in the schema or player create/update flows, so two active players on the same team can share the same away jersey. In that case `HashMap::insert` silently overwrites the earlier player and the import can save a lineup for the wrong player instead of reporting an ambiguous jersey number; please detect duplicate display numbers while building the map and return a validation error. Useful? React with 👍 / 👎. _Originally posted by @chatgpt-codex-connector[bot] in https://github.com/umpire274/bs_scoring/pull/77#discussion_r3354757803_
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
umpire274/bs_scoring#79
No description provided.