Bug: When a user attempted to substitute a player who didn't have the required position rating, the bot would display an error message but leave the database session in an inconsistent state. The old player was marked inactive and flushed to the session, but when the position check failed, the function returned early without rolling back the session. This left the session dirty, causing crashes on subsequent operations. Fix: Added session.rollback() before returning when PositionNotFoundException is caught, ensuring the database session is cleanly reset. Location: utilities/dropdown.py:479-480 in SelectBatterSub.callback() Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| autocomplete.py | ||
| buttons.py | ||
| dropdown.py | ||
| embeds.py | ||
| pages.py | ||
| supabase.py | ||