Skip to content

Fix deck update - #483

Merged
plural merged 1 commit into
mainfrom
migueldlr/fix-deck-update
Oct 12, 2026
Merged

plural merged 1 commit into
mainfrom
migueldlr/fix-deck-update

Conversation

@migueldlr

Copy link
Copy Markdown
Contributor

Currently, every PATCH /api/v3/private/decks/:id causes a 500. This change calls deck.deck_cards.create! instead of card_slots.create! (card_slots is a Hash, not an association), and only clears and rebuilds cards when card_slots is sent, so a notes-only update no longer wipes the deck.

@migueldlr
migueldlr requested a review from plural October 12, 2026 17:49
@migueldlr migueldlr mentioned this pull request Oct 12, 2026
@migueldlr
migueldlr force-pushed the migueldlr/fix-deck-update branch from b73460a to 7013c25 Compare October 12, 2026 21:55

@plural plural left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks for fixing this!!!

@plural
plural merged commit dc3056d into main Oct 12, 2026
5 checks passed
@migueldlr
migueldlr deleted the migueldlr/fix-deck-update branch October 13, 2026 01:42
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