fix: remove opt-out from jersey ordering options (#263) #265
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api!265
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "263-remove-opt-out"
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?
Summary
Opt-out is no longer available for jersey ordering. All players must now order a jersey. This removes opt-out from the API response and rejects it at both checkout endpoints, while preserving existing DB records.
Changes
src/basketball_api/routes/jersey.py-- Removed opt_out entry from JERSEY_OPTIONS list, added explicit 422 rejection for opt_out in POST /jersey/checkout, simplified validation guards that previously had opt_out carve-outs, removed the opt-out handling block (no-Stripe path)src/basketball_api/routes/checkout.py-- Added 422 rejection for opt_out jersey-category products in POST /checkout/create-session, added ProductCategory importtests/test_jersey.py-- Updated options count from 3 to 2, converted 4 opt-out success tests to rejection tests verifying 422 statustests/test_checkout.py-- Converted opt-out success tests to rejection tests, switched duplicate-order tests from opt-out product to reversible product with Stripe mockingTest Plan
python -m pytest tests/ -x -q)Review Checklist
Related Notes
Related
Closes #263
QA Review -- PR #265
Scope Check
Correctness
JERSEY_OPTIONSlist. Response will return 2 items. Correct.ProductType.opt_out AND ProductCategory.jersey, so future non-jersey opt-out products are unaffected. Correct.JerseyOption.opt_outandProductType.opt_outleft in models.py. Existing DB records (e.g. player id=113) remain intact. Correct per acceptance criteria.Test Coverage
Nits
None.
VERDICT: APPROVED
bfb728f86cb3f3a0da7a