paper-dynasty-discord/command_logic
Cal Corum 0163f24000 Fix null card_id in RosterLink causing IntegrityError
Previously, if get_card_or_none returned None (when a card ID from the
Google Sheet doesn't exist in the database), the code would create a
RosterLink with card=None, causing card_id to be null which violates
the NOT NULL constraint on the primary key.

Now we check if this_card is None before creating the RosterLink and
raise a CardNotFoundException with a helpful error message to guide
the user to fix their roster sheet.

Fixes the error: null value in column "card_id" of relation "rosterlink"
violates not-null constraint

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 09:15:07 -06:00
..
logic_gameplay.py Fix null card_id in RosterLink causing IntegrityError 2025-11-15 09:15:07 -06:00