Skip to content

Fix LinkInvalid on disable for memberships with invalid tier structure#4342

Open
gumclaw wants to merge 1 commit intomainfrom
fix/link-invalid-on-disable
Open

Fix LinkInvalid on disable for memberships with invalid tier structure#4342
gumclaw wants to merge 1 commit intomainfrom
fix/link-invalid-on-disable

Conversation

@gumclaw
Copy link
Copy Markdown
Contributor

@gumclaw gumclaw commented Apr 7, 2026

Summary

  • Fixes a Sentry bug where Link::LinkInvalid: Memberships should only have one Tier version category is raised when trying to disable a membership product via Api::V2::LinksController#disable
  • The valid_tier_version_structure validation now skips when purchase_disabled_at is being set, allowing users to unpublish products even if the tier structure became inconsistent (e.g., variant categories were deleted)
  • The validation remains active for all other update operations

Test plan

  • Added test: tiered membership with deleted variant categories can be unpublished without raising LinkInvalid
  • Added test: tiered membership with invalid tier structure still fails validation on other updates (regression safety)
  • All 9 existing unpublish-related tests continue to pass

🤖 Generated with Claude Code

@gumclaw gumclaw force-pushed the fix/link-invalid-on-disable branch from f449f3b to 33f8f20 Compare April 8, 2026 14:19
Skip tier version structure validation when a product is being
unpublished, so users can disable products even if variant categories
were deleted or became inconsistent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gumclaw gumclaw force-pushed the fix/link-invalid-on-disable branch from 33f8f20 to 05cb8c6 Compare April 8, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants