fix: Use db.insert() for ticket creation to fix SQLite serialization #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/sqlite-ticket-extra-serialization"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
type 'dict' is not supporteddb.execute()withdb.insert()for proper Pydantic model serializationProblem
The
create_ticket()function useddb.execute()with a raw dict fromticket.dict(). Theextrafield (aTicketExtraPydantic model) was converted to a Python dict that SQLite cannot serialize directly.Solution
Use
db.insert()which properly handles Pydantic model serialization, converting theextrafield to JSON automatically. This is consistent with howcreate_event()already works.TODO Added
Added a TODO comment to review the empty string workaround for name/email fields - this pattern converts None to empty strings for database storage and back to None when reading.
Merged manually via git CLI
🤖 Generated with Claude Code
Pull request closed