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> |
||
|---|---|---|
| .. | ||
| logic_gameplay.py | ||